Skip to content

Commit 6a9f497

Browse files
authored
Add message for missing submodule if websocketspp is missing. (#930)
1 parent 95409c5 commit 6a9f497

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Release/cmake/cpprest_find_websocketpp.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ function(cpprest_find_websocketpp)
77
if(WEBSOCKETPP_FOUND)
88
message("-- Found websocketpp version " ${WEBSOCKETPP_VERSION} " on system")
99
set(WEBSOCKETPP_INCLUDE_DIR ${WEBSOCKETPP_INCLUDE_DIR} CACHE INTERNAL "")
10-
else()
10+
elseif(EXISTS ${PROJECT_SOURCE_DIR}/libs/websocketpp/CMakeLists.txt)
1111
message("-- websocketpp not found, using the embedded version")
1212
set(WEBSOCKETPP_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/libs/websocketpp CACHE INTERNAL "")
13+
else()
14+
message(FATAL_ERROR "-- websocketpp not found and embedded version not present; try `git submodule update --init` and run CMake again")
1315
endif()
1416

1517
cpprest_find_boost()
@@ -22,4 +24,4 @@ function(cpprest_find_websocketpp)
2224
cpprestsdk_boost_internal
2325
cpprestsdk_openssl_internal
2426
)
25-
endfunction()
27+
endfunction()

0 commit comments

Comments
 (0)