mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Global CMake reorganization:
[~] Automatically tracked dependencies between modules [+] Support for optional module dependencies [+] Options to choose modules to build [~] Removed hardcoded modules lists from OpenCVConfig.cmake, opencv.pc and OpenCV.mk [+] Added COMPONENTS support for FIND_PACKAGE(OpenCV) [~] haartraining and traincascade are moved outside of modules folder since they aren't the modules
This commit is contained in:
@@ -4,30 +4,23 @@ file(GLOB sources "performance/*.cpp")
|
||||
file(GLOB headers "performance/*.h")
|
||||
|
||||
add_executable(${the_target} ${sources} ${headers})
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
set_target_properties(${the_target} PROPERTIES
|
||||
OUTPUT_NAME "performance_gpu"
|
||||
PROJECT_LABEL "(EXAMPLE_GPU) performance")
|
||||
|
||||
add_dependencies(${the_target} opencv_core opencv_flann opencv_imgproc opencv_highgui
|
||||
opencv_ml opencv_video opencv_objdetect opencv_features2d
|
||||
opencv_calib3d opencv_legacy opencv_contrib opencv_gpu)
|
||||
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_core
|
||||
opencv_flann opencv_imgproc opencv_highgui opencv_ml opencv_video opencv_objdetect
|
||||
opencv_features2d opencv_calib3d opencv_legacy opencv_contrib opencv_gpu)
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "samples//gpu")
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "samples//gpu")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/gpu" COMPONENT main)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/gpu" COMPONENT main)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
file(GLOB GPU_FILES performance/*.cpp performance/*.h)
|
||||
install(FILES ${GPU_FILES}
|
||||
DESTINATION share/opencv/samples/gpu/performance
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
|
||||
endif()
|
||||
file(GLOB GPU_FILES performance/*.cpp performance/*.h)
|
||||
install(FILES ${GPU_FILES}
|
||||
DESTINATION share/opencv/samples/gpu/performance
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user