diff --git a/libkworkspace/CMakeLists.txt b/libkworkspace/CMakeLists.txt index 85cbb5e6c..7ba097a6e 100644 --- a/libkworkspace/CMakeLists.txt +++ b/libkworkspace/CMakeLists.txt @@ -1,107 +1,102 @@ set(kworkspace_LIB_SRCS kdisplaymanager.cpp kworkspace.cpp sessionmanagement.cpp sessionmanagementbackend.cpp updatelaunchenvjob.cpp ) add_definitions(-DTRANSLATION_DOMAIN=\"libkworkspace\") remove_definitions(-DQT_NO_CAST_FROM_ASCII) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) remove_definitions(-DQT_NO_CAST_TO_ASCII) include_directories(${CMAKE_CURRENT_BINARY_DIR}) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${KINIT_DBUS_INTERFACES_DIR}/kf5_org.kde.KLauncher.xml klauncher_interface) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface ) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${plasma-workspace_SOURCE_DIR}/ksmserver/org.kde.LogoutPrompt.xml logoutprompt_interface) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${plasma-workspace_SOURCE_DIR}/startkde/plasma-session/org.kde.Startup.xml startup_interface) qt5_add_dbus_interface(kworkspace_LIB_SRCS ${plasma-workspace_SOURCE_DIR}/startkde/plasma-shutdown/org.kde.Shutdown.xml shutdown_interface) set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.login1.Manager.xml" "${CMAKE_SOURCE_DIR}/data/interfaces/org.freedesktop.login1.Seat.xml" "${CMAKE_SOURCE_DIR}/data/interfaces/org.freedesktop.login1.Session.xml" PROPERTIES INCLUDE "loginddbustypes.h" ) qt5_add_dbus_interface(kworkspace_LIB_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.login1.Manager.xml" login1_manager_interface) # The autogenerated cpp file hardcodes the interface name given to the QDBusAbstractAdaptor # This "hack" swaps the implementation for one that can switch between login1 and consolekit2 list(REMOVE_ITEM kworkspace_LIB_SRCS "${CMAKE_CURRENT_BINARY_DIR}/login1_manager_interface.cpp") list(APPEND kworkspace_LIB_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/login1_manager_interface.cpp") qt5_add_dbus_interface(kworkspace_LIB_SRCS "org.freedesktop.UPower.xml" upower_interface) qt5_add_dbus_interface(kworkspace_LIB_SRCS "org.freedesktop.ConsoleKit.Manager.xml" consolekit_manager_interface) set(ksmserver_xml ${plasma-workspace_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml) qt5_add_dbus_interface( kworkspace_LIB_SRCS ${ksmserver_xml} ksmserver_interface ) -set_source_files_properties(${KWIN_INTERFACE} PROPERTIES INCLUDE "interface_util.h") - -qt5_add_dbus_interface( kworkspace_LIB_SRCS ${KWIN_INTERFACE} kwin_interface ) - - add_library(kworkspace ${kworkspace_LIB_SRCS}) add_library(PW::KWorkspace ALIAS kworkspace) set_target_properties(kworkspace PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} EXPORT_NAME KWorkspace OUTPUT_NAME kworkspace5 ) generate_export_header(kworkspace) target_link_libraries(kworkspace PUBLIC Qt5::Core PRIVATE Qt5::DBus KF5::I18n KF5::WindowSystem KF5::Plasma ) target_include_directories(kworkspace PUBLIC "$" INTERFACE "$" ) configure_file(config-libkworkspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-libkworkspace.h) if(X11_FOUND) if(NOT X11_Xau_FOUND) message(FATAL_ERROR "Found X11, but not libXau which is required for building kworkspace") endif() target_link_libraries(kworkspace PRIVATE Qt5::X11Extras ${X11_LIBRARIES} ${X11_Xau_LIB}) endif() write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/LibKWorkspaceConfigVersion.cmake VERSION "${PROJECT_VERSION}" COMPATIBILITY AnyNewerVersion) install(TARGETS kworkspace EXPORT libkworkspaceLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) install( FILES kdisplaymanager.h kworkspace.h sessionmanagement.h updatelaunchenvjob.h ${CMAKE_CURRENT_BINARY_DIR}/config-libkworkspace.h ${CMAKE_CURRENT_BINARY_DIR}/kworkspace_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kworkspace5 COMPONENT Devel ) set(CMAKECONFIG_INSTALL_DIR ${KDE_INSTALL_LIBDIR}/cmake/LibKWorkspace) configure_package_config_file(LibKWorkspaceConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/LibKWorkspaceConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibKWorkspaceConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/LibKWorkspaceConfigVersion.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR}) install(EXPORT libkworkspaceLibraryTargets NAMESPACE PW:: DESTINATION ${CMAKECONFIG_INSTALL_DIR} FILE LibKWorkspaceLibraryTargets.cmake ) if(BUILD_TESTING) add_subdirectory(autotests) add_subdirectory(tests) endif() diff --git a/libkworkspace/interface_util.h b/libkworkspace/interface_util.h deleted file mode 100644 index 8a4fcd12c..000000000 --- a/libkworkspace/interface_util.h +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2008 Laurent Montel - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef INTERFACEUTIL_H -#define INTERFACEUTIL_H - - -// needed by the DBUS interface -Q_DECLARE_METATYPE(QList) -#endif