File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,16 @@ set(nlohmann_json_clone FALSE)
4141if (nlohmann_json_FOUND)
4242 message ("Using external nlohmann::json" )
4343else ()
44- include (cmake/nlohmann-json.cmake)
45- set (nlohmann_json_clone TRUE )
46- set (nlohmann_json_SOURCE_DIR
47- "${CMAKE_SOURCE_DIR} /nlohmann_json/single_include" )
48- include_directories (${nlohmann_json_SOURCE_DIR} )
49- message ("nlohmann_json package was not found. Cloning from github" )
44+ if (MAIN_PROJECT)
45+ include (cmake/nlohmann-json.cmake)
46+ set (nlohmann_json_clone TRUE )
47+ set (nlohmann_json_SOURCE_DIR
48+ "${CMAKE_SOURCE_DIR} /nlohmann_json/single_include" )
49+ include_directories (${nlohmann_json_SOURCE_DIR} )
50+ message ("nlohmann_json package was not found. Cloning from github" )
51+ else ()
52+ message (FATAL_ERROR "nlohmann_json package was not found which is required for opentelemetry-cpp-fluentd. Please install it" )
53+ endif ()
5054endif ()
5155
5256if (MAIN_PROJECT)
You can’t perform that action at this time.
0 commit comments