added opencv_test_highgui
This commit is contained in:
parent
5538e206f9
commit
bf05872929
@ -353,3 +353,63 @@ install(TARGETS ${the_target}
|
||||
install(FILES ${highgui_ext_hdrs}
|
||||
DESTINATION include/opencv2/highgui
|
||||
COMPONENT main)
|
||||
|
||||
|
||||
############################# highgui tests ################################
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/test"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
set(test_deps opencv_ts opencv_highgui)
|
||||
|
||||
foreach(d ${test_deps})
|
||||
if(${d} MATCHES "opencv_")
|
||||
string(REPLACE "opencv_" "${CMAKE_CURRENT_SOURCE_DIR}/../" d_dir ${d})
|
||||
include_directories("${d_dir}/include")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
file(GLOB test_srcs "test/*.cpp")
|
||||
file(GLOB test_hdrs "test/*.h*")
|
||||
|
||||
source_group("Src" FILES ${test_srcs})
|
||||
source_group("Include" FILES ${test_hdrs})
|
||||
|
||||
set(the_target "opencv_test_highgui")
|
||||
|
||||
add_executable(${the_target} ${test_srcs} ${test_hdrs})
|
||||
|
||||
if(PCHSupport_FOUND AND USE_PRECOMPILED_HEADERS)
|
||||
set(pch_header ${CMAKE_CURRENT_SOURCE_DIR}/test/test_precomp.hpp)
|
||||
if(${CMAKE_GENERATOR} MATCHES "Visual*" OR ${CMAKE_GENERATOR} MATCHES "Xcode*")
|
||||
if(${CMAKE_GENERATOR} MATCHES "Visual*")
|
||||
set(${the_target}_pch "test/test_precomp.cpp")
|
||||
endif()
|
||||
add_native_precompiled_header(${the_target} ${pch_header})
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX AND ${CMAKE_GENERATOR} MATCHES ".*Makefiles")
|
||||
add_precompiled_header(${the_target} ${pch_header})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Additional target properties
|
||||
set_target_properties(${the_target} PROPERTIES
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
|
||||
)
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "tests")
|
||||
endif()
|
||||
|
||||
add_dependencies(${the_target} ${test_deps})
|
||||
|
||||
# Add the required libraries for linking:
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${test_deps})
|
||||
|
||||
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()
|
||||
|
@ -41,6 +41,8 @@
|
||||
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
#if 0
|
||||
|
||||
using namespace cv;
|
||||
|
||||
//#define DRAW_TEST_IMAGE
|
||||
@ -408,3 +410,5 @@ int CV_DrawingTest_C::checkLineIterator( Mat& _img )
|
||||
|
||||
CV_DrawingTest_CPP drawing_test_cpp;
|
||||
CV_DrawingTest_C drawing_test_c;
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,9 @@
|
||||
//
|
||||
//M*/
|
||||
|
||||
#include "cvtest.h"
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
#if 0
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
@ -103,5 +105,6 @@ void CV_HighGuiOnlyGuiTest::run( int /*start_from */)
|
||||
}
|
||||
|
||||
CV_HighGuiOnlyGuiTest highGuiOnlyGui_test;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
#include "test_precomp.hpp"
|
||||
#include "opencv2/ts/ts_main.hpp"
|
||||
|
||||
CV_TEST_MAIN("cv")
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "opencv2/ts/ts.hpp"
|
||||
#include "opencv2/imgproc/imgproc.hpp"
|
||||
#include "opencv2/core/imgproc_c.h"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
#include <iostream>
|
||||
|
||||
#endif
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
#if 0
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
@ -310,3 +312,5 @@ CV_HighGuiTest HighGui_test;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user