• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set(the_target "example_gpu_performance")
2
3file(GLOB sources "performance/*.cpp")
4file(GLOB headers "performance/*.h")
5
6if(HAVE_opencv_xfeatures2d)
7  ocv_include_directories("${opencv_xfeatures2d_SOURCE_DIR}/include")
8endif()
9
10if(HAVE_opencv_bgsegm)
11  ocv_include_directories("${opencv_bgsegm_SOURCE_DIR}/include")
12endif()
13
14add_executable(${the_target} ${sources} ${headers})
15ocv_target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS})
16
17if(HAVE_opencv_xfeatures2d)
18  ocv_target_link_libraries(${the_target} opencv_xfeatures2d)
19endif()
20
21if(HAVE_opencv_bgsegm)
22  ocv_target_link_libraries(${the_target} opencv_bgsegm)
23endif()
24
25set_target_properties(${the_target} PROPERTIES
26    OUTPUT_NAME "performance_gpu"
27    PROJECT_LABEL "(EXAMPLE_CUDA) performance")
28
29if(ENABLE_SOLUTION_FOLDERS)
30  set_target_properties(${the_target} PROPERTIES FOLDER "samples//gpu")
31endif()
32
33if(WIN32)
34  install(TARGETS ${the_target} RUNTIME DESTINATION "${OPENCV_SAMPLES_BIN_INSTALL_PATH}/gpu" COMPONENT samples)
35endif()
36
37if(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)
43endif()
44