1 set(the_target "example_gpu_performance") 2 3 file(GLOB sources "performance/*.cpp") 4 file(GLOB headers "performance/*.h") 5 6 if(HAVE_opencv_xfeatures2d) 7 ocv_include_directories("${opencv_xfeatures2d_SOURCE_DIR}/include") 8 endif() 9 10 if(HAVE_opencv_bgsegm) 11 ocv_include_directories("${opencv_bgsegm_SOURCE_DIR}/include") 12 endif() 13 14 add_executable(${the_target} ${sources} ${headers}) 15 ocv_target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS}) 16 17 if(HAVE_opencv_xfeatures2d) 18 ocv_target_link_libraries(${the_target} opencv_xfeatures2d) 19 endif() 20 21 if(HAVE_opencv_bgsegm) 22 ocv_target_link_libraries(${the_target} opencv_bgsegm) 23 endif() 24 25 set_target_properties(${the_target} PROPERTIES 26 OUTPUT_NAME "performance_gpu" 27 PROJECT_LABEL "(EXAMPLE_CUDA) performance") 28 29 if(ENABLE_SOLUTION_FOLDERS) 30 set_target_properties(${the_target} PROPERTIES FOLDER "samples//gpu") 31 endif() 32 33 if(WIN32) 34 install(TARGETS ${the_target} RUNTIME DESTINATION "${OPENCV_SAMPLES_BIN_INSTALL_PATH}/gpu" COMPONENT samples) 35 endif() 36 37 if(INSTALL_C_EXAMPLES AND NOT WIN32) 38 file(GLOB CUDA_FILES performance/*.cpp performance/*.h) 39 install(FILES ${CUDA_FILES} 40 DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu/performance 41 PERMISSIONS OWNER_READ GROUP_READ WORLD_READ 42 COMPONENT samples) 43 endif() 44