2010-07-19 16:35:19 +02:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# CMake file for gputest. See root CMakeLists.txt
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
project(opencv_test_gpu)
|
|
|
|
|
|
|
|
file(GLOB test_srcs "src/*.cpp")
|
2011-01-25 16:23:02 +01:00
|
|
|
source_group("Src" FILES ${test_srcs})
|
2011-01-26 10:14:46 +01:00
|
|
|
file(GLOB test_hdrs "src/*.h*")
|
2010-07-19 16:35:19 +02:00
|
|
|
source_group("Include" FILES ${test_hdrs})
|
|
|
|
|
2011-01-26 10:14:46 +01:00
|
|
|
set(the_target "opencv_test_gpu")
|
2010-07-19 16:35:19 +02:00
|
|
|
|
2010-07-21 12:43:01 +02:00
|
|
|
include_directories (
|
2010-07-19 16:35:19 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/include/opencv"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/core/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/imgproc/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/features2d/include"
|
2010-10-12 21:47:50 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/modules/flann/include"
|
2010-07-19 16:35:19 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/modules/calib3d/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/highgui/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/objdetect/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/video/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/legacy/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/contrib/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/modules/gpu/include"
|
2010-08-12 15:47:53 +02:00
|
|
|
"${CMAKE_SOURCE_DIR}/modules/ml/include"
|
2010-07-19 16:35:19 +02:00
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(../cxts)
|
|
|
|
|
2011-01-26 10:14:46 +01:00
|
|
|
add_executable(${the_target} ${test_srcs} ${test_hdrs})
|
2010-07-19 16:35:19 +02:00
|
|
|
|
|
|
|
# Additional target properties
|
|
|
|
set_target_properties(${the_target} PROPERTIES
|
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
|
|
|
|
)
|
|
|
|
|
2010-07-23 09:06:33 +02:00
|
|
|
add_dependencies(${the_target} opencv_ts opencv_gpu opencv_highgui opencv_imgproc)
|
2010-07-19 16:35:19 +02:00
|
|
|
|
|
|
|
# Add the required libraries for linking:
|
2010-07-23 09:06:33 +02:00
|
|
|
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} opencv_ts opencv_gpu opencv_highgui opencv_imgproc)
|
2010-07-19 16:35:19 +02:00
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
get_target_property(LOC ${the_target} LOCATION)
|
|
|
|
add_test(${the_target} "${LOC}")
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main)
|
|
|
|
endif()
|
|
|
|
|