Update cmake files

This commit is contained in:
John Zhao 2018-07-11 12:59:56 +08:00
parent 25f72dd74f
commit 0153261447
4 changed files with 44 additions and 37 deletions

View File

@ -237,6 +237,22 @@ install(EXPORT ${MYNTEYE_NAME}-targets
## build.info
# set default int values for yaml file (build.info)
set_default_value(CMAKE_CXX_COMPILER_VERSION_MAJOR 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_MINOR 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_PATCH 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_TWEAK 0)
set_default_value(CUDA_VERSION_MAJOR 0)
set_default_value(CUDA_VERSION_MINOR 0)
set_default_value(OpenCV_VERSION_MAJOR 0)
set_default_value(OpenCV_VERSION_MINOR 0)
set_default_value(OpenCV_VERSION_PATCH 0)
set_default_value(OpenCV_VERSION_TWEAK 0)
set_default_value(${PROJECT_NAME}_VERSION_MAJOR 0)
set_default_value(${PROJECT_NAME}_VERSION_MINOR 0)
set_default_value(${PROJECT_NAME}_VERSION_PATCH 0)
set_default_value(${PROJECT_NAME}_VERSION_TWEAK 0)
configure_file(
cmake/templates/build.info.in
build.info @ONLY

View File

@ -61,25 +61,10 @@ endif()
find_package(CUDA QUIET)
# set default int values for yaml file (build.info)
set_version_values(CMAKE_CXX_COMPILER_VERSION)
set_default_value(CMAKE_CXX_COMPILER_VERSION_MAJOR 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_MINOR 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_PATCH 0)
set_default_value(CMAKE_CXX_COMPILER_VERSION_TWEAK 0)
set_default_value(CUDA_VERSION_MAJOR 0)
set_default_value(CUDA_VERSION_MINOR 0)
set_default_value(OpenCV_VERSION_MAJOR 0)
set_default_value(OpenCV_VERSION_MINOR 0)
set_default_value(OpenCV_VERSION_PATCH 0)
set_default_value(OpenCV_VERSION_TWEAK 0)
set_default_value(${PROJECT_NAME}_VERSION_MAJOR 0)
set_default_value(${PROJECT_NAME}_VERSION_MINOR 0)
set_default_value(${PROJECT_NAME}_VERSION_PATCH 0)
set_default_value(${PROJECT_NAME}_VERSION_TWEAK 0)
# summary
set_version_values(CMAKE_CXX_COMPILER_VERSION)
status("")
status("Platform:")
status(" HOST_OS: ${HOST_OS}")
@ -91,22 +76,28 @@ status(" COMPILER_VERSION_MAJOR: ${CMAKE_CXX_COMPILER_VERSION_MAJOR}")
status(" COMPILER_VERSION_MINOR: ${CMAKE_CXX_COMPILER_VERSION_MINOR}")
status(" COMPILER_VERSION_PATCH: ${CMAKE_CXX_COMPILER_VERSION_PATCH}")
status(" COMPILER_VERSION_TWEAK: ${CMAKE_CXX_COMPILER_VERSION_TWEAK}")
status(" CUDA_VERSION: ${CUDA_VERSION}")
status(" CUDA_VERSION_MAJOR: ${CUDA_VERSION_MAJOR}")
status(" CUDA_VERSION_MINOR: ${CUDA_VERSION_MINOR}")
status(" CUDA_VERSION_STRING: ${CUDA_VERSION_STRING}")
status(" OpenCV_VERSION: ${OpenCV_VERSION}")
status(" OpenCV_VERSION_MAJOR: ${OpenCV_VERSION_MAJOR}")
status(" OpenCV_VERSION_MINOR: ${OpenCV_VERSION_MINOR}")
status(" OpenCV_VERSION_PATCH: ${OpenCV_VERSION_PATCH}")
status(" OpenCV_VERSION_TWEAK: ${OpenCV_VERSION_TWEAK}")
status(" OpenCV_VERSION_STATUS: ${OpenCV_VERSION_STATUS}")
status(" OpenCV_WITH_WORLD: ${WITH_OPENCV_WORLD}")
status(" MYNTEYE_VERSION: ${mynteye_VERSION}")
status(" MYNTEYE_VERSION_MAJOR: ${mynteye_VERSION_MAJOR}")
status(" MYNTEYE_VERSION_MINOR: ${mynteye_VERSION_MINOR}")
status(" MYNTEYE_VERSION_PATCH: ${mynteye_VERSION_PATCH}")
status(" MYNTEYE_VERSION_TWEAK: ${mynteye_VERSION_TWEAK}")
if(CUDA_FOUND)
status(" CUDA_VERSION: ${CUDA_VERSION}")
status(" CUDA_VERSION_MAJOR: ${CUDA_VERSION_MAJOR}")
status(" CUDA_VERSION_MINOR: ${CUDA_VERSION_MINOR}")
status(" CUDA_VERSION_STRING: ${CUDA_VERSION_STRING}")
endif()
if(OpenCV_FOUND)
status(" OpenCV_VERSION: ${OpenCV_VERSION}")
status(" OpenCV_VERSION_MAJOR: ${OpenCV_VERSION_MAJOR}")
status(" OpenCV_VERSION_MINOR: ${OpenCV_VERSION_MINOR}")
status(" OpenCV_VERSION_PATCH: ${OpenCV_VERSION_PATCH}")
status(" OpenCV_VERSION_TWEAK: ${OpenCV_VERSION_TWEAK}")
status(" OpenCV_VERSION_STATUS: ${OpenCV_VERSION_STATUS}")
status(" OpenCV_WITH_WORLD: ${WITH_OPENCV_WORLD}")
endif()
if(mynteye_VERSION)
status(" MYNTEYE_VERSION: ${mynteye_VERSION}")
status(" MYNTEYE_VERSION_MAJOR: ${mynteye_VERSION_MAJOR}")
status(" MYNTEYE_VERSION_MINOR: ${mynteye_VERSION_MINOR}")
status(" MYNTEYE_VERSION_PATCH: ${mynteye_VERSION_PATCH}")
status(" MYNTEYE_VERSION_TWEAK: ${mynteye_VERSION_TWEAK}")
endif()
status("")
status("Options:")

View File

@ -79,4 +79,6 @@ add_subdirectory(uvc)
# tutorials
add_subdirectory(tutorials)
if(WITH_API)
add_subdirectory(tutorials)
endif()

View File

@ -63,7 +63,7 @@ macro(make_executable2 NAME)
endif()
endmacro()
if(WITH_API)
# packages
# If you install PCL to different directory, please set CMAKE_PREFIX_PATH to find it.
#LIST(APPEND CMAKE_PREFIX_PATH /usr/local/share)
@ -124,8 +124,6 @@ make_executable2(ctrl_manual_exposure
)
make_executable2(ctrl_infrared SRCS control/infrared.cc WITH_OPENCV)
endif()
# intermediate level
make_executable2(get_all_device_info SRCS intermediate/get_all_device_info.cc WITH_OPENCV)