|
1 | | -find_package(Threads REQUIRED) |
2 | | -find_package(OpenSSL REQUIRED) |
3 | | - |
4 | | -set(Boost_NO_WARN_NEW_VERSIONS ON) |
5 | | -find_package(Boost REQUIRED COMPONENTS program_options filesystem system thread random) |
6 | | - |
7 | | -find_package(msgpack CONFIG REQUIRED) |
8 | | -find_package(websocketpp CONFIG REQUIRED) |
9 | | - |
10 | | -find_package(PkgConfig REQUIRED) |
11 | | -pkg_check_modules(BOTAN2 botan-2 REQUIRED) |
12 | | - |
13 | | -MESSAGE(STATUS "AUTOBAHN_BUILD_EXAMPLES: " ${AUTOBAHN_BUILD_EXAMPLES}) |
14 | | -MESSAGE(STATUS "AUTOBAHN_USE_LIBCXX: " ${AUTOBAHN_USE_LIBCXX}) |
15 | | -MESSAGE(STATUS "CMAKE_ROOT: " ${CMAKE_ROOT}) |
16 | | -MESSAGE(STATUS "CMAKE_INSTALL_PREFIX: " ${CMAKE_INSTALL_PREFIX}) |
17 | | -MESSAGE(STATUS "Boost_INCLUDE_DIRS: " ${Boost_INCLUDE_DIRS}) |
18 | | -MESSAGE(STATUS "Boost_LIBRARIES: " ${Boost_LIBRARIES}) |
19 | | -get_target_property(MSGPACKC_INCLUDE_DIR msgpackc INTERFACE_INCLUDE_DIRECTORIES) |
20 | | -get_target_property(MSGPACKC_LIBRARIES msgpackc IMPORTED_LOCATION_RELEASE) |
21 | | -MESSAGE(STATUS "MSGPACKC_INCLUDE_DIR: " ${MSGPACKC_INCLUDE_DIR}) |
22 | | -MESSAGE(STATUS "MSGPACKC_LIBRARIES: " ${MSGPACKC_LIBRARIES}) |
23 | | -MESSAGE(STATUS "WEBSOCKETPP_INCLUDE_DIR: " ${WEBSOCKETPP_INCLUDE_DIR}) |
24 | | - |
25 | 1 | set(PUBLIC_HEADERS |
26 | 2 | ${CMAKE_CURRENT_SOURCE_DIR}/autobahn/autobahn.hpp |
27 | 3 | ${CMAKE_CURRENT_SOURCE_DIR}/autobahn/boost_config.hpp |
@@ -87,24 +63,25 @@ add_library(autobahn_cpp INTERFACE) |
87 | 63 |
|
88 | 64 | target_include_directories(autobahn_cpp INTERFACE |
89 | 65 | ${CMAKE_CURRENT_SOURCE_DIR} |
90 | | - ${OPENSSL_INCLUDE_DIR} |
91 | | - ${BOTAN2_INCLUDE_DIRS} |
92 | | - ${WEBSOCKETPP_INCLUDE_DIR} |
93 | | - ${MSGPACKC_INCLUDE_DIR}) |
| 66 | + CONAN_PKG::openssl |
| 67 | + CONAN_PKG::boost |
| 68 | + CONAN_PKG::msgpack-cxx |
| 69 | + CONAN_PKG::websocketpp |
| 70 | + CONAN_PKG::botan |
| 71 | + ) |
94 | 72 |
|
95 | 73 | target_link_libraries(autobahn_cpp INTERFACE |
96 | | - Boost::boost Boost::thread |
97 | | - websocketpp::websocketpp |
98 | | - msgpackc msgpackc-cxx |
99 | | - OpenSSL::SSL OpenSSL::Crypto |
100 | | - ${BOTAN2_LINK_LIBRARIES} |
101 | | - ${CMAKE_THREAD_LIBS_INIT} |
102 | | - ${CMAKE_DL_LIBS}) |
| 74 | + CONAN_PKG::openssl |
| 75 | + CONAN_PKG::boost |
| 76 | + CONAN_PKG::msgpack-cxx |
| 77 | + CONAN_PKG::websocketpp |
| 78 | + CONAN_PKG::botan |
| 79 | + ) |
103 | 80 |
|
104 | | -foreach(h ${PUBLIC_HEADERS}) |
| 81 | +foreach (h ${PUBLIC_HEADERS}) |
105 | 82 | string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "include/" include "${h}") |
106 | 83 | get_filename_component(HEADER_INCLUDE_DIRECTORY ${include} DIRECTORY) |
107 | 84 | install(FILES ${h} |
108 | | - DESTINATION ${HEADER_INCLUDE_DIRECTORY} |
109 | | - COMPONENT "headers") |
110 | | -endforeach() |
| 85 | + DESTINATION ${HEADER_INCLUDE_DIRECTORY} |
| 86 | + COMPONENT "headers") |
| 87 | +endforeach () |
0 commit comments