Warning, /plasma/oxygen/kdecoration/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 add_definitions(-DTRANSLATION_DOMAIN="oxygen_kdecoration")
0002 
0003 find_package(KDecoration2 REQUIRED)
0004 find_package(KF5 REQUIRED COMPONENTS CoreAddons ConfigWidgets WindowSystem)
0005 find_package(Qt${QT_MAJOR_VERSION} CONFIG REQUIRED COMPONENTS DBus)
0006 
0007 ### XCB
0008 find_package(XCB COMPONENTS XCB)
0009 set_package_properties(XCB PROPERTIES
0010   DESCRIPTION "X protocol C-language Binding"
0011   URL "http://xcb.freedesktop.org"
0012   TYPE OPTIONAL
0013   PURPOSE "Required to pass style properties to native Windows on X11 Platform"
0014 )
0015 
0016 include_directories(${CMAKE_SOURCE_DIR}/liboxygen)
0017 include_directories(${CMAKE_BINARY_DIR}/liboxygen)
0018 
0019 if(UNIX AND NOT APPLE)
0020 
0021   set(OXYGEN_HAVE_X11 ${XCB_XCB_FOUND})
0022   if (XCB_XCB_FOUND AND QT_MAJOR_VERSION EQUAL "5")
0023     find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras)
0024   endif()
0025 
0026 else()
0027 
0028   set(OXYGEN_HAVE_X11 FALSE)
0029 
0030 endif()
0031 
0032 ################# configuration #################
0033 configure_file(config-oxygen.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-oxygen.h )
0034 
0035 ################# newt target #################
0036 ### plugin classes
0037 set(oxygendecoration_SRCS
0038     oxygenbutton.cpp
0039     oxygendecohelper.cpp
0040     oxygendecoration.cpp
0041     oxygenexceptionlist.cpp
0042     oxygensettingsprovider.cpp
0043     oxygensizegrip.cpp)
0044 
0045 kconfig_add_kcfg_files(oxygendecoration_SRCS oxygensettings.kcfgc)
0046 
0047 ### config classes
0048 ### they are kept separately because they might move in a separate library in the future
0049 set(oxygendecoration_config_SRCS
0050     config/oxygenanimationconfigwidget.cpp
0051     config/oxygenconfigwidget.cpp
0052     config/oxygendetectwidget.cpp
0053     config/oxygenexceptiondialog.cpp
0054     config/oxygenexceptionlistwidget.cpp
0055     config/oxygenexceptionmodel.cpp
0056 )
0057 
0058 set(oxygendecoration_config_PART_FORMS
0059    config/ui/oxygenconfigurationui.ui
0060    config/ui/oxygendetectwidget.ui
0061    config/ui/oxygenexceptiondialog.ui
0062    config/ui/oxygenexceptionlistwidget.ui
0063 )
0064 
0065 ki18n_wrap_ui(oxygendecoration_config_PART_FORMS_HEADERS ${oxygendecoration_config_PART_FORMS})
0066 
0067 ### build library
0068 add_library(oxygendecoration MODULE
0069     ${oxygendecoration_SRCS}
0070     ${oxygendecoration_config_SRCS}
0071     ${oxygendecoration_config_PART_FORMS_HEADERS})
0072 
0073 target_link_libraries(oxygendecoration
0074     PUBLIC
0075         Qt::Core
0076         Qt::Gui
0077         Qt::DBus
0078     PRIVATE
0079         oxygenstyle5
0080         oxygenstyleconfig5
0081         KDecoration2::KDecoration
0082         KF5::ConfigCore
0083         KF5::CoreAddons
0084         KF5::ConfigWidgets
0085         KF5::GuiAddons
0086         KF5::I18n
0087         KF5::WindowSystem)
0088 
0089 if(OXYGEN_HAVE_X11)
0090   target_link_libraries(oxygendecoration PUBLIC XCB::XCB)
0091   if (QT_MAJOR_VERSION EQUAL "5")
0092     target_link_libraries(oxygendecoration PUBLIC Qt::X11Extras)
0093   else()
0094     target_link_libraries(oxygendecoration PUBLIC Qt::GuiPrivate)
0095   endif()
0096 endif()
0097 
0098 
0099 install(TARGETS oxygendecoration DESTINATION ${KDE_INSTALL_PLUGINDIR}/org.kde.kdecoration2)
0100 install(FILES config/oxygendecorationconfig.desktop DESTINATION  ${KDE_INSTALL_KSERVICESDIR})