mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
cmake: properly include asio.
This commit is contained in:
parent
4aa9b3e89b
commit
649e9c46ff
@ -52,14 +52,17 @@ target_include_directories(Crow
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
find_package(asio REQUIRED)
|
||||
find_path(ASIO_INCLUDE_DIR asio.hpp REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
target_link_libraries(Crow
|
||||
INTERFACE
|
||||
asio::asio
|
||||
Threads::Threads
|
||||
)
|
||||
target_include_directories(Crow
|
||||
INTERFACE
|
||||
${ASIO_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if("compression" IN_LIST CROW_FEATURES)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
@ -1,7 +1,7 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(asio)
|
||||
find_path(ASIO_INCLUDE_DIR asio.hpp REQUIRED)
|
||||
find_dependency(Threads)
|
||||
|
||||
set(CROW_INSTALLED_FEATURES "@CROW_FEATURES@")
|
||||
@ -41,3 +41,8 @@ set_target_properties(Crow::Crow PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "${_CROW_ICD}"
|
||||
INTERFACE_LINK_LIBRARIES "${_CROW_ILL}"
|
||||
)
|
||||
|
||||
target_include_directories(Crow::Crow
|
||||
INTERFACE
|
||||
${ASIO_INCLUDE_DIR}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user