File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,20 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
165165
166166# These settings can be used by the test targets
167167set (Casablanca_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /include )
168- set (Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} /libs/websocketpp)
168+
169+ find_path (WEBSOCKETPP_CONFIG websocketpp-config.cmake
170+ HINTS /usr/lib/cmake/websocketpp)
171+ find_path (WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake
172+ HINTS /usr/lib/cmake/websocketpp)
173+ if (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
174+ include (${WEBSOCKETPP_CONFIG} /websocketpp-config.cmake)
175+ include (${WEBSOCKETPP_CONFIG} /websocketpp-configVersion.cmake)
176+ message ("-- Found websocketpp version " ${PACKAGE_VERSION} " on system" )
177+ set (Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include ${Boost_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR} )
178+ else (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
179+ set (Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} /libs/websocketpp)
180+ message ("-- websocketpp not found, using the embedded version" )
181+ endif (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION)
169182
170183set (Casablanca_LIBRARY ${LIB} cpprest)
171184set (Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} )
You can’t perform that action at this time.
0 commit comments