Fix some more Qt5 leftovers in a Qt6 build

This commit is contained in:
Alexander Lohnau 2023-05-21 10:42:00 +02:00
parent 120ac70802
commit b1b04eff67
9 changed files with 16 additions and 13 deletions

View file

@ -11,6 +11,9 @@ project(kdeconnect VERSION ${RELEASE_SERVICE_VERSION})
if (SAILFISHOS)
set(KF5_MIN_VERSION "5.36.0")
set(QT_MIN_VERSION "5.6.0")
function(qt_add_resources)
qt_add_resources(${ARGN})
endfunction()
else()
set(KF5_MIN_VERSION "5.101.0")
set(QT_MIN_VERSION "5.15.2")
@ -76,8 +79,8 @@ else()
)
if(UNIX AND NOT APPLE)
find_package(KF5Package REQUIRED)
find_package(KF5PulseAudioQt)
find_package(KF${QT_MAJOR_VERSION}Package REQUIRED)
find_package(KF${QT_MAJOR_VERSION}PulseAudioQt)
if (QT_MAJOR_VERSION EQUAL "5")
find_package(QtWaylandScanner REQUIRED)
endif()
@ -88,8 +91,8 @@ else()
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
endif()
find_package(KF5PeopleVCard)
set_package_properties(KF5PeopleVCard PROPERTIES
find_package(KF${QT_MAJOR_VERSION}PeopleVCard)
set_package_properties(KF${QT_MAJOR_VERSION}PeopleVCard PROPERTIES
PURPOSE "Read vcards from the file system"
URL "https://invent.kde.org/pim/kpeoplevcard"
TYPE RUNTIME

View file

@ -1,6 +1,6 @@
qt5_add_resources(kdeconnect_SRCS resources.qrc)
qt_add_resources(kdeconnect_SRCS resources.qrc)
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KDE_CONNECT

View file

@ -7,7 +7,7 @@ ecm_qt_declare_logging_category(
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)")
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
add_executable(kdeconnectd kdeconnectd.cpp ${kdeconnect_custom_icons_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnectd

View file

@ -7,7 +7,7 @@ ecm_qt_declare_logging_category(
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (indicator)")
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
set(indicator_SRCS
main.cpp

View file

@ -39,7 +39,7 @@ if(NOT SAILFISHOS)
add_subdirectory(virtualmonitor)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(KF5ModemManagerQt ${KF5_MIN_VERSION})
find_package(KF${QT_MAJOR_VERSION}ModemManagerQt ${KF5_MIN_VERSION})
if (TARGET KF${QT_MAJOR_VERSION}::ModemManagerQt)
add_subdirectory(mmtelephony)
endif()

View file

@ -1,4 +1,4 @@
qt5_add_resources(presenter_SRCS assets.qrc)
qt_add_resources(presenter_SRCS assets.qrc)
set(debug_file_SRCS)
ecm_qt_declare_logging_category(

View file

@ -1,6 +1,6 @@
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings")
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
add_executable(kdeconnect-settings
main.cpp

View file

@ -35,7 +35,7 @@ target_link_libraries(kdeconnectsmshelper
kdeconnectinterfaces
)
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
add_executable(kdeconnect-sms
main.cpp

View file

@ -2,7 +2,7 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-urlhandler")
ki18n_wrap_ui(telhandler_SRCS dialog.ui)
qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
add_executable(kdeconnect-handler kdeconnect-handler.cpp ${telhandler_SRCS} ${kdeconnect_custom_icons_SRCS})