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)
165
165
166
166
# These settings can be used by the test targets
167
167
set (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 ${Casablanca_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${WEBSOCKETPP_INCLUDE_DIR} )
178
+ else (WEBSOCKETPP_CONFIG AND WEBSOCKETPP_CONFIG_VERSION )
179
+ set (Casablanca_INCLUDE_DIRS ${Casablanca_INCLUDE_DIR} ${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 )
169
182
170
183
set (Casablanca_LIBRARY ${LIB} cpprest )
171
184
set (Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} )
You can’t perform that action at this time.
0 commit comments