diff --git a/Release/cmake/cpprest_find_websocketpp.cmake b/Release/cmake/cpprest_find_websocketpp.cmake index 260311f0a3..94ea81a473 100644 --- a/Release/cmake/cpprest_find_websocketpp.cmake +++ b/Release/cmake/cpprest_find_websocketpp.cmake @@ -7,9 +7,11 @@ function(cpprest_find_websocketpp) if(WEBSOCKETPP_FOUND) message("-- Found websocketpp version " ${WEBSOCKETPP_VERSION} " on system") set(WEBSOCKETPP_INCLUDE_DIR ${WEBSOCKETPP_INCLUDE_DIR} CACHE INTERNAL "") - else() + elseif(EXISTS ${PROJECT_SOURCE_DIR}/libs/websocketpp/CMakeLists.txt) message("-- websocketpp not found, using the embedded version") set(WEBSOCKETPP_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/libs/websocketpp CACHE INTERNAL "") + else() + message(FATAL_ERROR "-- websocketpp not found and embedded version not present; try `git submodule update --init` and run CMake again") endif() cpprest_find_boost() @@ -22,4 +24,4 @@ function(cpprest_find_websocketpp) cpprestsdk_boost_internal cpprestsdk_openssl_internal ) -endfunction() \ No newline at end of file +endfunction()