Skip to content

Commit

Permalink
Merge pull request #598 from elucideye/pr.nlohmann
Browse files Browse the repository at this point in the history
Add missing dependency
  • Loading branch information
ruslo authored Oct 24, 2017
2 parents b6360c3 + 39ab6b7 commit d5d40d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
11 changes: 7 additions & 4 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
Expand All @@ -31,15 +31,19 @@ endif()

##
## Experimental: typically disabled for release
##
##

if(@DRISHTI_BUILD_DEST@)
find_package(dest CONFIG REQUIRED)
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)
Expand All @@ -50,4 +54,3 @@ endif()

include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
check_required_components("@PROJECT_NAME@")

10 changes: 9 additions & 1 deletion src/lib/drishti/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 #######
##################
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit d5d40d5

Please sign in to comment.