mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
3.1 KiB
87 lines
3.1 KiB
13 years ago
|
if(IOS OR ANDROID)
|
||
|
return()
|
||
|
endif()
|
||
|
|
||
|
SET(OPENCV_HAARTRAINING_DEPS opencv_core opencv_imgproc opencv_highgui opencv_objdetect opencv_calib3d opencv_video opencv_features2d opencv_flann opencv_legacy)
|
||
|
ocv_check_dependencies(${OPENCV_HAARTRAINING_DEPS})
|
||
|
|
||
|
if(NOT OCV_DEPENDENCIES_FOUND)
|
||
|
return()
|
||
13 years ago
|
endif()
|
||
|
|
||
15 years ago
|
project(haartraining)
|
||
|
|
||
13 years ago
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
|
||
|
ocv_include_modules(${OPENCV_HAARTRAINING_DEPS})
|
||
15 years ago
|
|
||
|
if(WIN32)
|
||
13 years ago
|
link_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||
15 years ago
|
endif()
|
||
|
|
||
13 years ago
|
link_libraries(${OPENCV_HAARTRAINING_DEPS} opencv_haartraining_engine)
|
||
15 years ago
|
|
||
|
# -----------------------------------------------------------
|
||
|
# Library
|
||
|
# -----------------------------------------------------------
|
||
|
set(cvhaartraining_lib_src
|
||
13 years ago
|
_cvcommon.h
|
||
|
cvclassifier.h
|
||
|
_cvhaartraining.h
|
||
|
cvhaartraining.h
|
||
|
cvboost.cpp
|
||
|
cvcommon.cpp
|
||
|
cvhaarclassifier.cpp
|
||
|
cvhaartraining.cpp
|
||
|
cvsamples.cpp
|
||
|
)
|
||
15 years ago
|
|
||
|
add_library(opencv_haartraining_engine STATIC ${cvhaartraining_lib_src})
|
||
14 years ago
|
set_target_properties(opencv_haartraining_engine PROPERTIES
|
||
13 years ago
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||
|
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||
|
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||
|
INSTALL_NAME_DIR lib
|
||
|
)
|
||
15 years ago
|
|
||
|
# -----------------------------------------------------------
|
||
|
# haartraining
|
||
|
# -----------------------------------------------------------
|
||
|
|
||
|
add_executable(opencv_haartraining cvhaartraining.h haartraining.cpp)
|
||
|
set_target_properties(opencv_haartraining PROPERTIES
|
||
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||
|
OUTPUT_NAME "opencv_haartraining")
|
||
|
|
||
|
# -----------------------------------------------------------
|
||
|
# createsamples
|
||
|
# -----------------------------------------------------------
|
||
|
|
||
|
add_executable(opencv_createsamples cvhaartraining.h createsamples.cpp)
|
||
|
set_target_properties(opencv_createsamples PROPERTIES
|
||
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||
|
OUTPUT_NAME "opencv_createsamples")
|
||
|
|
||
|
# -----------------------------------------------------------
|
||
|
# performance
|
||
|
# -----------------------------------------------------------
|
||
|
add_executable(opencv_performance performance.cpp)
|
||
|
set_target_properties(opencv_performance PROPERTIES
|
||
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||
|
OUTPUT_NAME "opencv_performance")
|
||
|
|
||
|
# -----------------------------------------------------------
|
||
|
# Install part
|
||
|
# -----------------------------------------------------------
|
||
|
|
||
|
install(TARGETS opencv_haartraining RUNTIME DESTINATION bin COMPONENT main)
|
||
|
install(TARGETS opencv_createsamples RUNTIME DESTINATION bin COMPONENT main)
|
||
|
install(TARGETS opencv_performance RUNTIME DESTINATION bin COMPONENT main)
|
||
14 years ago
|
|
||
14 years ago
|
if(ENABLE_SOLUTION_FOLDERS)
|
||
13 years ago
|
set_target_properties(opencv_performance PROPERTIES FOLDER "applications")
|
||
|
set_target_properties(opencv_createsamples PROPERTIES FOLDER "applications")
|
||
|
set_target_properties(opencv_haartraining PROPERTIES FOLDER "applications")
|
||
|
set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications")
|
||
14 years ago
|
endif()
|
||
13 years ago
|
|