1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

It's qt6 only

This commit is contained in:
Laurent Montel 2023-11-29 08:35:11 +01:00
parent 6bd0bdd849
commit 3a31ea79b2
5 changed files with 36 additions and 36 deletions

View File

@ -54,14 +54,14 @@ endif()
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII)
# Mandatory: Qt5/6
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebChannel)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebChannel)
find_package(Qt6WebEngineCore ${QT_MIN_VERSION} REQUIRED)
find_package(Qt6WebEngineWidgets ${QT_MIN_VERSION} REQUIRED)
if (BUILD_TESTING)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
endif()
if (NOT DISABLE_DBUS)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus)
endif()
if (UNIX AND NOT APPLE AND NOT NO_X11)
@ -70,7 +70,7 @@ if (UNIX AND NOT APPLE AND NOT NO_X11)
endif()
if (WIN32)
add_definitions(-DW7API)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS WinExtras)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS WinExtras)
# taken from https://stackoverflow.com/a/40217291
macro(get_WIN32_WINNT version)
@ -101,11 +101,11 @@ find_package(Qt6Core5Compat)
find_package(OpenSSL REQUIRED)
# Mandatory: KF6
find_package(KF${KF_MAJOR_VERSION} REQUIRED COMPONENTS Archive)
find_package(KF6 REQUIRED COMPONENTS Archive)
# KF5I18n: Mandatory with downloaded translations (only for ki18n_install)
if (EXISTS "${CMAKE_SOURCE_DIR}/po")
find_package(KF${KF_MAJOR_VERSION}I18n REQUIRED)
find_package(KF6I18n REQUIRED)
endif()
# Optional: GnomeKeyring
@ -118,19 +118,19 @@ if (PKG_CONFIG_FOUND)
endif()
# Optional: KWallet, KIO, KCrash, KCoreAddons
find_package(KF${KF_MAJOR_VERSION}Wallet ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}Wallet PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF${KF_MAJOR_VERSION}KIO ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}KIO PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF${KF_MAJOR_VERSION}Crash ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}Crash PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF${KF_MAJOR_VERSION}CoreAddons ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}CoreAddons PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF${KF_MAJOR_VERSION}Purpose ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}Purpose PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF${KF_MAJOR_VERSION}JobWidgets ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF${KF_MAJOR_VERSION}JobWidgets PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
if (KF${KF_MAJOR_VERSION}Wallet_FOUND AND KF${KF_MAJOR_VERSION}KIO_FOUND AND KF${KF_MAJOR_VERSION}Crash_FOUND AND KF${KF_MAJOR_VERSION}CoreAddons_FOUND AND KF${KF_MAJOR_VERSION}Purpose_FOUND AND KF${KF_MAJOR_VERSION}JobWidgets_FOUND)
find_package(KF6Wallet ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6Wallet PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF6KIO ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6KIO PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF6Crash ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6Crash PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF6CoreAddons ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6CoreAddons PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF6Purpose ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6Purpose PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
find_package(KF6JobWidgets ${KF_MIN_VERSION} CONFIG)
set_package_properties(KF6JobWidgets PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL)
if (KF6Wallet_FOUND AND KF6KIO_FOUND AND KF6Crash_FOUND AND KF6CoreAddons_FOUND AND KF6Purpose_FOUND AND KF6JobWidgets_FOUND)
set(ENABLE_KDE_FRAMEWORKS_INTEGRATION_PLUGIN TRUE)
endif()

View File

@ -32,7 +32,7 @@ endif()
if (UNIX AND NOT APPLE)
install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/falkon)
if (KF${KF_MAJOR_VERSION}I18n_FOUND)
if (KF6I18n_FOUND)
ki18n_install(${CMAKE_SOURCE_DIR}/po)
endif()
ecm_install_po_files_as_qm(${CMAKE_SOURCE_DIR}/poqm)

View File

@ -20,11 +20,11 @@ add_library(KDEFrameworksIntegration MODULE ${KDEFrameworksIntegration_SRCS} ${R
install(TARGETS KDEFrameworksIntegration DESTINATION ${FALKON_INSTALL_PLUGINDIR})
target_link_libraries(KDEFrameworksIntegration
FalkonPrivate
KF${KF_MAJOR_VERSION}::Wallet
KF${KF_MAJOR_VERSION}::KIOCore
KF${KF_MAJOR_VERSION}::KIOWidgets
KF${KF_MAJOR_VERSION}::Crash
KF${KF_MAJOR_VERSION}::CoreAddons
KF${KF_MAJOR_VERSION}::PurposeWidgets
KF${KF_MAJOR_VERSION}::JobWidgets
KF6::Wallet
KF6::KIOCore
KF6::KIOWidgets
KF6::Crash
KF6::CoreAddons
KF6::PurposeWidgets
KF6::JobWidgets
)

View File

@ -4,13 +4,13 @@ if(POLICY CMP0071)
endif()
# Get all relevant Qt include dirs, to pass them on to shiboken.
get_property(QT_CORE_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_GUI_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::Gui PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_SQL_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::Sql PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WIDGETS_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::Widgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_NETWORK_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::Network PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WEBENGINECORE_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::WebEngineCore PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WEBENGINEWIDGETS_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::WebEngineWidgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_CORE_INCLUDE_DIRS TARGET Qt6::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_GUI_INCLUDE_DIRS TARGET Qt6::Gui PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_SQL_INCLUDE_DIRS TARGET Qt6::Sql PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WIDGETS_INCLUDE_DIRS TARGET Qt6::Widgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_NETWORK_INCLUDE_DIRS TARGET Qt6::Network PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WEBENGINECORE_INCLUDE_DIRS TARGET Qt6::WebEngineCore PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_WEBENGINEWIDGETS_INCLUDE_DIRS TARGET Qt6::WebEngineWidgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set(QT_INCLUDE_DIRS
${QT_CORE_INCLUDE_DIRS}
${QT_GUI_INCLUDE_DIRS}
@ -20,7 +20,7 @@ set(QT_INCLUDE_DIRS
${QT_WEBENGINECORE_INCLUDE_DIRS}
${QT_WEBENGINEWIDGETS_INCLUDE_DIRS}
)
get_property(QT_PRINTSUPPORT_INCLUDE_DIRS TARGET Qt${QT_MAJOR_VERSION}::PrintSupport PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(QT_PRINTSUPPORT_INCLUDE_DIRS TARGET Qt6::PrintSupport PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
list(APPEND QT_INCLUDE_DIRS ${QT_PRINTSUPPORT_INCLUDE_DIRS})
set(INCLUDES "")
foreach(INCLUDE_DIR ${QT_INCLUDE_DIRS})

View File

@ -6,7 +6,7 @@ macro(pyfalkon_tests)
endmacro()
add_executable(pyfalkontestrunner pyfalkontestrunner.cpp)
target_link_libraries(pyfalkontestrunner FalkonPrivate Qt${QT_MAJOR_VERSION}::Test)
target_link_libraries(pyfalkontestrunner FalkonPrivate Qt6::Test)
pyfalkon_tests(
basictest