Add WITH_DEVICE_INFO_REQUIRED option

This commit is contained in:
John Zhao
2018-07-11 12:17:21 +08:00
parent 438ba6481d
commit 25f72dd74f
3 changed files with 27 additions and 9 deletions

View File

@@ -22,6 +22,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake)
option(WITH_API "Build with API layer, need OpenCV" ON)
option(WITH_DEVICE_INFO_REQUIRED "Build with device info required" ON)
# 3rdparty components
option(WITH_BOOST "Include Boost support" ON)
@@ -33,6 +35,10 @@ if(WITH_API)
include(${CMAKE_CURRENT_LIST_DIR}/DetectOpenCV.cmake)
endif()
if(WITH_DEVICE_INFO_REQUIRED)
add_definitions(-DWITH_DEVICE_INFO_REQUIRED)
endif()
if(WITH_BOOST)
find_package(Boost COMPONENTS filesystem)
if(Boost_FOUND)
@@ -115,6 +121,8 @@ if(WITH_API)
endif()
endif()
status(" WITH_DEVICE_INFO_REQUIRED: ${WITH_DEVICE_INFO_REQUIRED}")
status(" WITH_BOOST: ${WITH_BOOST}")
if(WITH_BOOST)
if(Boost_FOUND)