Unverified Commit 7e56d6f7 authored by Andreas Sturmlechner's avatar Andreas Sturmlechner
Browse files

Make tests optional with standard BUILD_TESTING switch



Qt5OpenGL is only needed for tests.

Signed-off-by: default avatarAndreas Sturmlechner <asturm@gentoo.org>
parent c7d4dd43
Pipeline #215447 passed with stage
in 2 minutes and 31 seconds
......@@ -13,7 +13,7 @@ set(KF5_MIN_VERSION 5.70.0)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(Qt5 NO_MODULE REQUIRED COMPONENTS Core Gui Widgets Quick Test OpenGL)
find_package(Qt5 NO_MODULE REQUIRED COMPONENTS Core Gui Widgets Quick)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config DocTools KIO I18n Purpose Notifications)
find_package(PkgConfig REQUIRED)
......
......@@ -59,19 +59,22 @@ target_link_libraries(gst${QTVIDEOSINK_NAME}
install(TARGETS gst${QTVIDEOSINK_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/gstreamer-${GSTREAMER_ABI_VERSION})
ecm_add_test(
autotest.cpp
utils/utils.cpp
utils/bufferformat.cpp
painters/genericsurfacepainter.cpp
painters/openglsurfacepainter.cpp
${GstQtVideoSink_test_GL_SRCS}
LINK_LIBRARIES
PkgConfig::GStreamerVideo
${GstQtVideoSink_GL_LIBS}
Qt5::Test
Qt5::OpenGL
Qt5::Quick
TEST_NAME qtvideosink_autotest
)
if(BUILD_TESTING)
find_package(Qt5 NO_MODULE REQUIRED COMPONENTS OpenGL Test)
ecm_add_test(
autotest.cpp
utils/utils.cpp
utils/bufferformat.cpp
painters/genericsurfacepainter.cpp
painters/openglsurfacepainter.cpp
${GstQtVideoSink_test_GL_SRCS}
LINK_LIBRARIES
PkgConfig::GStreamerVideo
${GstQtVideoSink_GL_LIBS}
Qt5::Test
Qt5::OpenGL
Qt5::Quick
Qt5::Widgets
TEST_NAME qtvideosink_autotest
)
endif()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment