diff --git a/cmake/modules/njson.cmake b/cmake/modules/njson.cmake index 4225e1d6..dd5a332b 100644 --- a/cmake/modules/njson.cmake +++ b/cmake/modules/njson.cmake @@ -19,8 +19,9 @@ if(USE_BUNDLED_NLOHMANN_JSON) CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/njson-prefix -DJSON_BuildTests=OFF -DBUILD_TESTING=OFF ) - set(nlohmann_json_DIR ${PROJECT_BINARY_DIR}/njson-prefix/include) + set(nlohmann_json_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/njson-prefix/include) else() find_package(nlohmann_json CONFIG REQUIRED) + get_target_property(nlohmann_json_INCLUDE_DIRS nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) add_custom_target(njson) endif() diff --git a/userspace/engine/CMakeLists.txt b/userspace/engine/CMakeLists.txt index e7f21ec6..78f681ce 100644 --- a/userspace/engine/CMakeLists.txt +++ b/userspace/engine/CMakeLists.txt @@ -39,7 +39,7 @@ PUBLIC ${LIBSCAP_INCLUDE_DIRS} ${LIBSINSP_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/userspace/engine - ${nlohmann_json_DIR} + ${nlohmann_json_INCLUDE_DIRS} ${TBB_INCLUDE_DIR} ${YAMLCPP_INCLUDE_DIR} )