Commit c9e203a3 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Adapt buildsystem to Qt6

parent 80ecdda8
Pipeline #261851 passed with stage
in 3 minutes and 37 seconds
......@@ -13,7 +13,15 @@ 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)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(ECMAddTests)
include(FeatureSummary)
include(ECMSetupVersion)
find_package(Qt${QT_MAJOR_VERSION} 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)
......@@ -36,13 +44,6 @@ ecm_find_qmlmodule(QtQuick.Dialogs 1.0)
ecm_find_qmlmodule(QtQuick.Layouts 1.1)
ecm_find_qmlmodule(QtQuick.Window 2.2)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(ECMAddTests)
include(FeatureSummary)
include(ECMSetupVersion)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_subdirectory(src)
......
......@@ -4,7 +4,7 @@ add_definitions(-DGST_DISABLE_DEPRECATED)
add_definitions(-fexceptions)
add_definitions(-DQT_NO_KEYWORDS)
qt5_add_resources(kamosoqml_SRCS resources.qrc)
qt_add_resources(kamosoqml_SRCS resources.qrc)
kconfig_add_kcfg_files(kamosoqml_SRCS kamosoSettings.kcfgc GENERATE_MOC)
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KAMOSO VERSION_HEADER kamoso_version.h)
......@@ -27,12 +27,12 @@ add_executable(kamoso
)
target_link_libraries(kamoso
Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Quick
Qt::Core Qt::Gui Qt::Widgets Qt::Quick
KF5::KIOFileWidgets KF5::ConfigGui KF5::I18n KF5::Notifications
PkgConfig::GStreamer
)
install(TARGETS kamoso ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kamoso.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kamoso.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR})
install(FILES kamoso.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
install(FILES kamoso-shutter.wav DESTINATION ${KDE_INSTALL_SOUNDDIR})
......@@ -54,13 +54,14 @@ add_library(gst${QTVIDEOSINK_NAME} MODULE ${GstQtVideoSink_SRCS})
target_link_libraries(gst${QTVIDEOSINK_NAME}
PkgConfig::GStreamerVideo
${GstQtVideoSink_GL_LIBS}
Qt5::Quick
Qt::Quick
)
install(TARGETS gst${QTVIDEOSINK_NAME} DESTINATION ${KDE_INSTALL_LIBDIR}/gstreamer-${GSTREAMER_ABI_VERSION})
if(BUILD_TESTING)
find_package(Qt5 NO_MODULE REQUIRED COMPONENTS OpenGL Test)
find_package(Qt${QT_MAJOR_VERSION} NO_MODULE REQUIRED COMPONENTS OpenGL Test)
ecm_add_test(
autotest.cpp
utils/utils.cpp
......@@ -71,10 +72,10 @@ if(BUILD_TESTING)
LINK_LIBRARIES
PkgConfig::GStreamerVideo
${GstQtVideoSink_GL_LIBS}
Qt5::Test
Qt5::OpenGL
Qt5::Quick
Qt5::Widgets
Qt::Test
Qt::OpenGL
Qt::Quick
Qt::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