0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-19 19:42:29 +02:00

Add lz4 to the build

This commit is contained in:
Arne Schwabe 2018-04-25 13:11:46 +02:00
parent 6c0bf4d7a5
commit 249508632b
4 changed files with 14 additions and 1 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -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()

1
main/src/main/cpp/lz4 Submodule

@ -0,0 +1 @@
Subproject commit cadf5cd5f9289a9dc8bc60d2357452573908e729

View File

@ -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")