Home | History | Annotate | Download | only in traincascade
      1 set(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_imgproc opencv_objdetect opencv_imgcodecs opencv_highgui opencv_calib3d opencv_features2d)
      2 ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS})
      3 
      4 if(NOT OCV_DEPENDENCIES_FOUND)
      5   return()
      6 endif()
      7 
      8 project(traincascade)
      9 set(the_target opencv_traincascade)
     10 
     11 ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
     12 ocv_target_include_modules_recurse(${the_target} ${OPENCV_TRAINCASCADE_DEPS})
     13 
     14 file(GLOB SRCS *.cpp)
     15 file(GLOB HDRS *.h*)
     16 
     17 set(traincascade_files ${SRCS} ${HDRS})
     18 
     19 ocv_add_executable(${the_target} ${traincascade_files})
     20 ocv_target_link_libraries(${the_target} ${OPENCV_TRAINCASCADE_DEPS})
     21 
     22 set_target_properties(${the_target} PROPERTIES
     23                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
     24                       ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
     25                       RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
     26                       INSTALL_NAME_DIR lib
     27                       OUTPUT_NAME "opencv_traincascade")
     28 
     29 if(ENABLE_SOLUTION_FOLDERS)
     30   set_target_properties(${the_target} PROPERTIES FOLDER "applications")
     31 endif()
     32 
     33 if(INSTALL_CREATE_DISTRIB)
     34   if(BUILD_SHARED_LIBS)
     35     install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
     36   endif()
     37 else()
     38   install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
     39 endif()
     40