mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
CMake: Reorder includes to prefer asio
By adding the asio includes first we have a better
chance to force using "our" asio. This can be important
since some parts of the code require a patched version.
The actual "core" parts of the code work fine with
upstream asio however, so I also do not want to
force the patched asio by requiring a special header
name or directory structure.
So this is a compromise solution which hopefully works
for most use-cases.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
(cherry picked from commit bc7f4be01b
)
This commit is contained in:
parent
38ef9f2786
commit
c9939d271b
@ -80,20 +80,24 @@ function(add_core_dependencies target)
|
||||
endif ()
|
||||
else ()
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${DEP_DIR}/mbedtls/mbedtls-${PLAT}
|
||||
${DEP_DIR}/lz4/lz4-${PLAT}
|
||||
${DEP_DIR}/asio/asio
|
||||
${DEP_DIR}/lz4/lz4-${PLAT}
|
||||
${DEP_DIR}/mbedtls/mbedtls-${PLAT}
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${DEP_DIR}/mbedtls/mbedtls-${PLAT}/library
|
||||
)
|
||||
endif ()
|
||||
|
||||
find_package(lz4 REQUIRED)
|
||||
# asio should go first since some of our code requires
|
||||
# a patched version. So we want to prefer its include
|
||||
# directories.
|
||||
find_package(asio REQUIRED)
|
||||
target_link_libraries(${target} lz4::lz4)
|
||||
target_link_libraries(${target} asio::asio)
|
||||
|
||||
find_package(lz4 REQUIRED)
|
||||
target_link_libraries(${target} lz4::lz4)
|
||||
|
||||
add_ssl_library(${target})
|
||||
|
||||
if (APPLE)
|
||||
|
Loading…
Reference in New Issue
Block a user