diff --git a/KF5KDE4SupportConfig.cmake.in b/KF5KDE4SupportConfig.cmake.in index 30a10ddb..4f4eea1a 100644 --- a/KF5KDE4SupportConfig.cmake.in +++ b/KF5KDE4SupportConfig.cmake.in @@ -1,33 +1,34 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) find_dependency(KF5KDELibs4Support "@KF5_DEP_VERSION@") if(NOT TARGET KF5::KDE4Support) add_library(KF5::KDE4Support @KDELibs4Support_LIB_TYPE@ IMPORTED) # Because CMake won't let us alias an imported target, we have to # create a new imported target and copy the properties we care about set(_copy_props INTERFACE_INCLUDE_DIRECTORIES INTERFACE_LINK_LIBRARIES IMPORTED_CONFIGURATIONS ) get_target_property(_configs KF5::KDELibs4Support IMPORTED_CONFIGURATIONS) foreach(_config ${_configs}) set(_copy_props ${_copy_props} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} IMPORTED_LOCATION_${_config} IMPORTED_SONAME_${_config} ) endforeach() foreach(_prop ${_copy_props}) get_target_property(_temp_prop KF5::KDELibs4Support "${_prop}") set_target_properties(KF5::KDE4Support PROPERTIES "${_prop}" "${_temp_prop}") endforeach() message(AUTHOR_WARNING " The KF5KDE4Support package is deprecated: use find_package(KF5KDELibs4Support) or find_package(KF5 COMPONENTS KDELibs4Support) instead.") endif() diff --git a/KF5KDELibs4SupportConfig.cmake.in b/KF5KDELibs4SupportConfig.cmake.in index c3a7216f..93592a69 100644 --- a/KF5KDELibs4SupportConfig.cmake.in +++ b/KF5KDELibs4SupportConfig.cmake.in @@ -1,101 +1,102 @@ @PACKAGE_INIT@ # This needs to be set before finding dependencies, since it uses # PACKAGE_PREFIX_DIR, which may be overwritten by the config files # of other packages. set(KDE4_DBUS_INTERFACES_DIR "@PACKAGE_KDE_INSTALL_DBUSINTERFACEDIR@") +include(CMakeFindDependencyMacro) find_dependency(KF5Auth "@KF5_DEP_VERSION@") find_dependency(KF5Archive "@KF5_DEP_VERSION@") find_dependency(KF5ConfigWidgets "@KF5_DEP_VERSION@") find_dependency(KF5CoreAddons "@KF5_DEP_VERSION@") find_dependency(KF5Crash "@KF5_DEP_VERSION@") find_dependency(KF5DesignerPlugin "@KF5_DEP_VERSION@") find_dependency(KF5DocTools "@KF5_DEP_VERSION@") find_dependency(KF5Emoticons "@KF5_DEP_VERSION@") find_dependency(KF5GuiAddons "@KF5_DEP_VERSION@") find_dependency(KF5IconThemes "@KF5_DEP_VERSION@") find_dependency(KF5ItemModels "@KF5_DEP_VERSION@") find_dependency(KF5Init "@KF5_DEP_VERSION@") find_dependency(KF5Notifications "@KF5_DEP_VERSION@") find_dependency(KF5Parts "@KF5_DEP_VERSION@") find_dependency(KF5TextWidgets "@KF5_DEP_VERSION@") find_dependency(KF5UnitConversion "@KF5_DEP_VERSION@") find_dependency(KF5WindowSystem "@KF5_DEP_VERSION@") find_dependency(KF5DBusAddons "@KF5_DEP_VERSION@") find_dependency(Qt5DBus @REQUIRED_QT_VERSION@) find_dependency(Qt5Xml @REQUIRED_QT_VERSION@) find_dependency(Qt5PrintSupport @REQUIRED_QT_VERSION@) if(WIN32) find_dependency(KDEWin) endif() include("${CMAKE_CURRENT_LIST_DIR}/KF5KDELibs4SupportTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/ECMQt4To5Porting.cmake") include("${CMAKE_CURRENT_LIST_DIR}/KDE4Macros.cmake") include("${CMAKE_CURRENT_LIST_DIR}/MacroAppendIf.cmake") include("${CMAKE_CURRENT_LIST_DIR}/MacroEnsureOutOfSourceBuild.cmake") include("${CMAKE_CURRENT_LIST_DIR}/MacroBoolTo01.cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") remove_definitions( -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII ) # This is not intended to be a list of what frameworks each of the kde libraries # was broken into. KDE4_KDECORE_LIBS contains more than what used to be in # the kdecore library. That is a feature. These things should be big ugly warts # in any project using them. The KDELibs4Support module is not for long term use and # it is not for 'making code build with both Qt/KDE 4 and Qt/KF 5' for medium or # long term. In trivial cases, no use of KDELibs4Support will be pushed to the repo # of the code being ported. # # The use-sequence is this: # 1. When starting to port something to KF5, find and use KDELibs4Support. # 2. Port the C++ code to Qt5/KF5. # 3. Port the buildsystem away from KDELibs4Support. # 4. Remove the find_package for KDELibs4Support. set(KDE4_KDECORE_LIBS KF5::KDELibs4Support Qt5::Network Qt5::DBus Qt5::Xml KF5::KIOCore KF5::I18n KF5::CoreAddons KF5::Codecs KF5::ConfigCore KF5::WidgetsAddons KF5::ItemModels KF5::ConfigWidgets KF5::Completion KF5::XmlGui KF5::IconThemes KF5::KIOWidgets KF5::ItemViews KF5::Emoticons ) set(KDE4_KDEUI_LIBS ${KDE4_KDECORE_LIBS}) set(KDE4_KIO_LIBS ${KDE4_KDECORE_LIBS}) set(KDE4_KPARTS_LIBS ${KDE4_KPARTS_LIBS}) set(KDE4_KUTILS_LIBS ${KDE4_KUTILS_LIBS}) set(KDE4_KFILE_LIBS ${KDE4_KFILE_LIBS}) set(KDE4_KHTML_LIBS ${KDE4_KHTML_LIBS}) set(KDE4_KDELIBS4SUPPORT_LIBS ${KDE4_KDECORE_LIBS}) set(KDE4_INCLUDES $) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")) set (KDE4_ENABLE_EXCEPTIONS -EHsc) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set (KDE4_ENABLE_EXCEPTIONS "-fexceptions -UQT_NO_EXCEPTIONS") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") set (KDE4_ENABLE_EXCEPTIONS -fexceptions) endif()