mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
e8a520ed96
- build "opencv_version" only: `cmake -DBUILD_APPS_LIST=version ...` - option 'BUILD_opencv_apps' should be 'ON'
25 lines
593 B
CMake
25 lines
593 B
CMake
add_definitions(-D__OPENCV_BUILD=1)
|
|
add_definitions(-D__OPENCV_APPS=1)
|
|
|
|
link_libraries(${OPENCV_LINKER_LIBS})
|
|
|
|
macro(ocv_add_app directory)
|
|
if(DEFINED BUILD_APPS_LIST)
|
|
list(FIND BUILD_APPS_LIST ${directory} _index)
|
|
if (${_index} GREATER -1)
|
|
add_subdirectory(${directory})
|
|
else()
|
|
message(STATUS "Skip OpenCV app: ${directory}")
|
|
endif()
|
|
else()
|
|
add_subdirectory(${directory})
|
|
endif()
|
|
endmacro()
|
|
|
|
ocv_add_app(traincascade)
|
|
ocv_add_app(createsamples)
|
|
ocv_add_app(annotation)
|
|
ocv_add_app(visualisation)
|
|
ocv_add_app(interactive-calibration)
|
|
ocv_add_app(version)
|