diff options
author | Arne Schwabe <arne@rfc2549.org> | 2018-04-25 13:11:46 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2018-04-25 13:11:46 +0200 |
commit | 249508632b0367a1a0cbcb64cf5abf3c3eccbc47 (patch) | |
tree | fa6f5b3d4032c59224c899f65f678e55b1c06135 | |
parent | 6c0bf4d7a52dd6e60f368e454dab7c91487c97ff (diff) |
Add lz4 to the build
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | main/src/main/cpp/CMakeLists.txt | 4 | ||||
m--------- | main/src/main/cpp/lz4 | 0 | ||||
-rw-r--r-- | main/src/main/cpp/lz4.cmake | 7 |
4 files changed, 13 insertions, 1 deletions
diff --git a/.gitmodules b/.gitmodules index 522c88a7..7b202530 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "main/src/main/cpp/asio"] path = main/src/main/cpp/asio url = ../../chriskohlhoff/asio/ +[submodule "main/src/main/cpp/lz4"] + path = main/src/main/cpp/lz4 + url = ../../lz4/lz4.git diff --git a/main/src/main/cpp/CMakeLists.txt b/main/src/main/cpp/CMakeLists.txt index bdeff5bf..2b776f6b 100644 --- a/main/src/main/cpp/CMakeLists.txt +++ b/main/src/main/cpp/CMakeLists.txt @@ -16,6 +16,7 @@ OPTION(ENABLE_TESTING "" OFF) #add_subdirectory(lzo) include(tools.cmake) include(lzo.cmake) +include(lz4.cmake) include(openssl.cmake) # Super hacky way to determine flavour @@ -61,13 +62,14 @@ if (NOT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} MATCHES "build/intermediates/cmake/.*n target_compile_definitions(ovpn3 PRIVATE -DHAVE_CONFIG_H -DHAVE_LZO + -DHAVE_LZ4 -DASIO_STANDALONE -DUSE_ASIO -DUSE_MBEDTLS -DGIT_VERSION_STRING=\"${OPENVPN3_GIT}\" -DNO_ROUTE_EXCLUDE_EMULATION ) - target_link_libraries(ovpn3 mbedtls mbedx509 mbedcrypto lzo) + target_link_libraries(ovpn3 mbedtls mbedx509 mbedcrypto lzo lz4) else() message ("Not budiling OpenVPN for output dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") endif() diff --git a/main/src/main/cpp/lz4 b/main/src/main/cpp/lz4 new file mode 160000 +Subproject cadf5cd5f9289a9dc8bc60d2357452573908e72 diff --git a/main/src/main/cpp/lz4.cmake b/main/src/main/cpp/lz4.cmake new file mode 100644 index 00000000..d5e618c6 --- /dev/null +++ b/main/src/main/cpp/lz4.cmake @@ -0,0 +1,7 @@ +set(lz4_srcs + lz4.c + ) + +PREPEND(lz4_src_with_path "lz4/lib/" ${lz4_srcs}) +add_library(lz4 ${lz4_src_with_path}) +target_include_directories(lz4 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/lz4/lib") |