2014-08-03 05:41:09 +08:00
|
|
|
set(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_imgproc opencv_objdetect opencv_imgcodecs opencv_highgui opencv_calib3d opencv_features2d)
|
2012-02-03 19:26:49 +08:00
|
|
|
ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS})
|
|
|
|
|
|
|
|
if(NOT OCV_DEPENDENCIES_FOUND)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
project(traincascade)
|
2014-08-01 22:11:20 +08:00
|
|
|
set(the_target opencv_traincascade)
|
2012-02-03 19:26:49 +08:00
|
|
|
|
2018-03-20 20:53:57 +08:00
|
|
|
ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual
|
|
|
|
-Winconsistent-missing-override -Wsuggest-override
|
|
|
|
)
|
2016-10-07 23:49:52 +08:00
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
|
2015-03-26 20:25:42 +08:00
|
|
|
ocv_target_include_modules_recurse(${the_target} ${OPENCV_TRAINCASCADE_DEPS})
|
2012-02-03 19:26:49 +08:00
|
|
|
|
2014-08-03 05:41:09 +08:00
|
|
|
file(GLOB SRCS *.cpp)
|
|
|
|
file(GLOB HDRS *.h*)
|
|
|
|
|
|
|
|
set(traincascade_files ${SRCS} ${HDRS})
|
2012-02-03 19:26:49 +08:00
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_add_executable(${the_target} ${traincascade_files})
|
|
|
|
ocv_target_link_libraries(${the_target} ${OPENCV_TRAINCASCADE_DEPS})
|
2012-02-03 19:26:49 +08:00
|
|
|
|
|
|
|
set_target_properties(${the_target} PROPERTIES
|
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
|
|
|
OUTPUT_NAME "opencv_traincascade")
|
2012-10-17 15:12:04 +08:00
|
|
|
|
2012-02-03 19:26:49 +08:00
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
|
|
|
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
2012-10-17 15:12:04 +08:00
|
|
|
endif()
|
2012-02-03 19:26:49 +08:00
|
|
|
|
2013-08-07 16:53:48 +08:00
|
|
|
if(INSTALL_CREATE_DISTRIB)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
2014-01-17 20:30:31 +08:00
|
|
|
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
|
2013-08-07 16:53:48 +08:00
|
|
|
endif()
|
|
|
|
else()
|
2015-01-19 23:03:29 +08:00
|
|
|
install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
|
2013-08-07 16:53:48 +08:00
|
|
|
endif()
|