opencv/modules/gpu/perf4au/CMakeLists.txt

29 lines
960 B
CMake
Raw Normal View History

2013-02-13 19:58:24 +08:00
set(PERF4AU_REQUIRED_DEPS opencv_core opencv_imgproc opencv_highgui opencv_video opencv_legacy opencv_gpu opencv_ts)
ocv_check_dependencies(${PERF4AU_REQUIRED_DEPS})
2013-12-19 22:36:02 +08:00
if (OCV_DEPENDENCIES_FOUND)
set(the_target gpu_perf4au)
project(${the_target})
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
ocv_include_modules(${PERF4AU_REQUIRED_DEPS})
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
2013-02-13 19:58:24 +08:00
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
2013-12-19 22:36:02 +08:00
endif()
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
file(GLOB srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h *.hpp)
add_executable(${the_target} ${srcs})
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${PERF4AU_REQUIRED_DEPS})
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "tests performance")
endif()
2013-02-13 19:58:24 +08:00
2013-12-19 22:36:02 +08:00
if(WIN32)
2013-02-13 19:58:24 +08:00
if(MSVC AND NOT BUILD_SHARED_LIBS)
2013-12-19 22:36:02 +08:00
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")
2013-02-13 19:58:24 +08:00
endif()
2013-12-19 22:36:02 +08:00
endif()
endif()