diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index d9532b9c..367a4af2 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -12,7 +12,7 @@ find_package(ARM_NEON_2_x86_SSE CONFIG REQUIRED) # header find_package(Eigen3 CONFIG REQUIRED) # header find_package(cereal CONFIG REQUIRED) # header find_package(dlib CONFIG REQUIRED) # header (for now) -find_package(half CONFIG REQUIRED) # header +find_package(half CONFIG REQUIRED) # header find_package(spdlog CONFIG REQUIRED) # header find_package(sse2neon CONFIG REQUIRED) # header if(@DRISHTI_USE_THREAD_POOL_CPP@) @@ -31,7 +31,7 @@ endif() ## ## Experimental: typically disabled for release -## +## if(@DRISHTI_BUILD_DEST@) find_package(dest CONFIG REQUIRED) @@ -39,7 +39,11 @@ endif() if(@DRISHTI_BUILD_EOS@) find_package(eos CONFIG REQUIRED) - find_package(Boost CONFIG REQUIRED filesystem system) + find_package(Boost CONFIG REQUIRED filesystem system) +endif() + +if(@DRISHTI_BUILD_FACE@) + find_package(nlohmann_json CONFIG REQUIRED) endif() find_package(glm CONFIG REQUIRED) @@ -50,4 +54,3 @@ endif() include("${CMAKE_CURRENT_LIST_DIR}/@drishti_targets_export_name@.cmake") check_required_components("@PROJECT_NAME@") - diff --git a/src/lib/drishti/CMakeLists.txt b/src/lib/drishti/CMakeLists.txt index 287c914d..467726b8 100644 --- a/src/lib/drishti/CMakeLists.txt +++ b/src/lib/drishti/CMakeLists.txt @@ -19,6 +19,11 @@ endif() set(LIB_TYPE STATIC) +if(DRISHTI_BUILD_FACE) + hunter_add_package(nlohmann_json) + find_package(nlohmann_json CONFIG REQUIRED) +endif() + ################## #### world ####### ################## @@ -108,6 +113,9 @@ if(DRISHTI_BUILD_WORLD) drishti_hide(drishti_world) target_link_libraries(drishti_world PUBLIC ${DRISHTI_SDK_3RDPARTY_LIBS} xgboost::xgboost Eigen3::Eigen) + if(DRISHTI_BUILD_FACE) + target_link_libraries(drishti_world PUBLIC nlohmann_json) + endif() if(DRISHTI_USE_THREAD_POOL_CPP) target_link_libraries(drishti_world PUBLIC thread-pool-cpp::thread-pool-cpp) @@ -175,7 +183,7 @@ else() ## drishti_face if(DRISHTI_BUILD_FACE) add_library(drishti_face ${LIB_TYPE} ${DRISHTI_FACE_SRCS} ${DRISHTI_FACE_HDRS_PUBLIC}) - target_link_libraries(drishti_face PUBLIC drishti_eye ${DRISHTI_OBJ_ACF} ${OpenCV_LIBS} ${EOS_LIB}) + target_link_libraries(drishti_face PUBLIC drishti_eye ${DRISHTI_OBJ_ACF} ${OpenCV_LIBS} ${EOS_LIB} nlohmann_json) set(DRISHTI_OBJ_FACE drishti_face) endif()