2010-05-12 01:44:00 +08:00
|
|
|
project(traincascade)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/core/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/ml/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/video/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
|
2010-10-13 03:47:50 +08:00
|
|
|
"${CMAKE_SOURCE_DIR}/modules/flann/include"
|
2010-05-12 01:44:00 +08:00
|
|
|
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/legacy/include"
|
|
|
|
)
|
|
|
|
|
2010-06-11 07:38:37 +08:00
|
|
|
set(traincascade_libs opencv_core opencv_ml opencv_imgproc
|
|
|
|
opencv_objdetect opencv_highgui opencv_haartraining_engine)
|
2010-05-12 01:44:00 +08:00
|
|
|
|
|
|
|
set(traincascade_files traincascade.cpp
|
|
|
|
cascadeclassifier.cpp cascadeclassifier.h
|
|
|
|
boost.cpp boost.h features.cpp traincascade_features.h
|
|
|
|
haarfeatures.cpp haarfeatures.h
|
|
|
|
lbpfeatures.cpp lbpfeatures.h
|
|
|
|
imagestorage.cpp imagestorage.h)
|
|
|
|
|
2010-06-11 07:38:37 +08:00
|
|
|
set(the_target opencv_traincascade)
|
|
|
|
add_executable(${the_target} ${traincascade_files})
|
|
|
|
|
|
|
|
add_dependencies(${the_target} ${traincascade_libs})
|
|
|
|
set_target_properties(${the_target} PROPERTIES
|
2010-05-12 01:44:00 +08:00
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
2011-04-30 18:42:33 +08:00
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
|
|
|
|
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
|
2010-05-12 01:44:00 +08:00
|
|
|
OUTPUT_NAME "opencv_traincascade")
|
2011-05-11 21:37:20 +08:00
|
|
|
|
2011-05-17 17:40:06 +08:00
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
2011-05-11 21:37:20 +08:00
|
|
|
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
|
|
|
endif()
|
2010-05-12 01:44:00 +08:00
|
|
|
|
2010-06-11 07:38:37 +08:00
|
|
|
target_link_libraries(${the_target} ${traincascade_libs})
|
2010-05-12 01:44:00 +08:00
|
|
|
|
2010-06-11 07:38:37 +08:00
|
|
|
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|