Warning, /frameworks/kwindowsystem/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 configure_file(config-kwindowsystem.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwindowsystem.h ) 0002 0003 add_library(KF5WindowSystem) 0004 add_library(KF5::WindowSystem ALIAS KF5WindowSystem) 0005 0006 ecm_create_qm_loader(KF5WindowSystem kwindowsystem5_qt) 0007 0008 target_sources(KF5WindowSystem PRIVATE 0009 kkeyserver.cpp 0010 kstartupinfo.cpp 0011 kusertimestamp.cpp 0012 kwindoweffects.cpp 0013 kwindoweffects_dummy.cpp 0014 kwindowinfo.cpp 0015 kwindowshadow.cpp 0016 kwindowsystem.cpp 0017 pluginwrapper.cpp 0018 kwindowsystemplugininterface.cpp 0019 ) 0020 ecm_qt_declare_logging_category(KF5WindowSystem 0021 HEADER kwindowsystem_debug.h 0022 IDENTIFIER LOG_KWINDOWSYSTEM 0023 CATEGORY_NAME kf.windowsystem 0024 OLD_CATEGORY_NAMES org.kde.kwindowsystem 0025 DEFAULT_SEVERITY Warning 0026 DESCRIPTION "KWindowSystem" 0027 EXPORT KWINDOWSYSTEM 0028 ) 0029 ecm_qt_declare_logging_category(KF5WindowSystem 0030 HEADER kwindowsystem_xcb_debug.h 0031 IDENTIFIER LOG_KKEYSERVER_X11 0032 CATEGORY_NAME kf.windowsystem.keyserver.x11 0033 OLD_CATEGORY_NAMES org.kde.kwindowsystem.keyserver.x11 0034 DEFAULT_SEVERITY Warning 0035 DESCRIPTION "KKeyServer (KWindowSystem)" 0036 EXPORT KWINDOWSYSTEM 0037 ) 0038 0039 if (KWINDOWSYSTEM_HAVE_X11) 0040 if(NOT X11_Xfixes_LIB) 0041 message(FATAL_ERROR "The XFixes library could not be found. Please install the development package for it.") 0042 endif() 0043 target_include_directories(KF5WindowSystem 0044 PRIVATE 0045 ${CMAKE_CURRENT_SOURCE_DIR}/platforms/xcb 0046 ) 0047 0048 if (TARGET Qt5::X11Extras) 0049 set(_qt_x11_libs Qt5::X11Extras) 0050 elseif (TARGET Qt6::Gui) 0051 set(_qt_x11_libs Qt6::GuiPrivate) # qtx11extras_p.h 0052 endif() 0053 0054 0055 target_link_libraries(KF5WindowSystem 0056 PUBLIC 0057 # public because they are used in kkeyserver_x11.h 0058 X11::X11 0059 PRIVATE 0060 XCB::XCB 0061 X11::Xfixes 0062 XCB::KEYSYMS 0063 ${_qt_x11_libs} 0064 ) 0065 0066 target_sources(KF5WindowSystem PRIVATE 0067 platforms/xcb/kkeyserver.cpp 0068 platforms/xcb/kselectionowner.cpp 0069 platforms/xcb/kselectionwatcher.cpp 0070 platforms/xcb/kxerrorhandler.cpp 0071 platforms/xcb/kxmessages.cpp 0072 platforms/xcb/kxutils.cpp 0073 platforms/xcb/netwm.cpp 0074 kx11extras.cpp 0075 ) 0076 0077 # we install kkeyserver_x11.h which needs the X11 headers available 0078 # if we don't add the include path here code that includes kkeyserver.h will fail 0079 # to compile unless X11 is installed in /usr/include 0080 target_include_directories(KF5WindowSystem PUBLIC ${XCB_XCB_INCLUDE_DIR}) 0081 endif () 0082 0083 if (APPLE) 0084 target_include_directories(KF5WindowSystem 0085 PRIVATE 0086 ${CMAKE_CURRENT_SOURCE_DIR}/platforms/osx) 0087 target_sources(KF5WindowSystem PRIVATE 0088 platforms/osx/kkeyserver.cpp 0089 # kwindowsystem_mac.cpp 0090 # FIXME: adjust kwindowinfo_mac to inherit from KWindowInfoPrivate 0091 # kwindowinfo_mac.cpp 0092 ) 0093 target_link_libraries(KF5WindowSystem 0094 PRIVATE 0095 "-framework CoreFoundation -framework Carbon" 0096 ) 0097 endif () 0098 0099 if (WIN32) 0100 target_include_directories(KF5WindowSystem 0101 PRIVATE 0102 ${CMAKE_CURRENT_SOURCE_DIR}/platforms/windows 0103 ) 0104 target_sources(KF5WindowSystem PRIVATE 0105 platforms/windows/kkeyserver.cpp 0106 # kwindowsystem_win.cpp 0107 # FIXME: adjust kwindowinfo_win to inherit from KWindowInfoPrivate 0108 # kwindowinfo_win.cpp 0109 ) 0110 target_link_libraries(KF5WindowSystem PRIVATE ws2_32) # gethostname() 0111 if (QT_MAJOR_VERSION EQUAL "5") 0112 target_link_libraries(KF5WindowSystem PRIVATE Qt5::WinExtras) # QtWin::fromHICON(), QtWin::toHICON() 0113 endif() 0114 endif () 0115 0116 ecm_generate_export_header(KF5WindowSystem 0117 BASE_NAME KWindowSystem 0118 GROUP_BASE_NAME KF 0119 VERSION ${KF_VERSION} 0120 DEPRECATED_BASE_VERSION 0 0121 DEPRECATION_VERSIONS 5.0 5.18 5.38 5.62 5.67 5.69 5.80 5.81 5.82 5.101 5.102 5.104 0122 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} 0123 ) 0124 0125 target_include_directories(KF5WindowSystem INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KWindowSystem>") 0126 0127 target_link_libraries(KF5WindowSystem 0128 PUBLIC Qt${QT_MAJOR_VERSION}::Gui 0129 ) 0130 if(NOT KWINDOWSYSTEM_NO_WIDGETS) 0131 target_link_libraries(KF5WindowSystem PUBLIC Qt${QT_MAJOR_VERSION}::Widgets) 0132 endif() 0133 0134 set_target_properties(KF5WindowSystem PROPERTIES VERSION ${KWINDOWSYSTEM_VERSION} 0135 SOVERSION ${KWINDOWSYSTEM_SOVERSION} 0136 EXPORT_NAME WindowSystem 0137 ) 0138 0139 ecm_generate_headers(KWindowSystem_HEADERS 0140 HEADER_NAMES 0141 KKeyServer 0142 KStartupInfo 0143 KUserTimestamp 0144 KWindowEffects 0145 KWindowInfo 0146 KWindowShadow,KWindowShadowTile 0147 KWindowSystem 0148 0149 REQUIRED_HEADERS KWindowSystem_HEADERS 0150 ) 0151 0152 if (KWINDOWSYSTEM_HAVE_X11) 0153 ecm_generate_headers(KWindowSystem_HEADERS 0154 HEADER_NAMES 0155 KX11Extras 0156 0157 REQUIRED_HEADERS KWindowSystem_HEADERS 0158 ) 0159 endif() 0160 0161 install(TARGETS KF5WindowSystem EXPORT KF5WindowSystemTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS}) 0162 0163 install(FILES 0164 # FIXME: It seems odd to install this. 0165 ${CMAKE_CURRENT_BINARY_DIR}/config-kwindowsystem.h 0166 ${CMAKE_CURRENT_BINARY_DIR}/kwindowsystem_export.h 0167 ${KWindowSystem_HEADERS} 0168 netwm_def.h 0169 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KWindowSystem COMPONENT Devel 0170 ) 0171 0172 install( 0173 FILES 0174 kwindoweffects_p.h 0175 kwindowinfo_p.h 0176 kwindowshadow_p.h 0177 kwindowsystem_p.h 0178 kwindowsystemplugininterface_p.h 0179 DESTINATION 0180 ${KDE_INSTALL_INCLUDEDIR_KF}/KWindowSystem/private 0181 COMPONENT 0182 Devel 0183 ) 0184 0185 if(BUILD_QCH) 0186 ecm_add_qch( 0187 KF5WindowSystem_QCH 0188 NAME KWindowSystem 0189 BASE_NAME KF5WindowSystem 0190 VERSION ${KF_VERSION} 0191 ORG_DOMAIN org.kde 0192 SOURCE_DIRS 0193 # using dir for now, to cover any platform dependent code 0194 # TODO: should only use public headers, to cover only public API 0195 ${CMAKE_CURRENT_SOURCE_DIR} 0196 MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" 0197 LINK_QCHS 0198 Qt5Gui_QCH 0199 INCLUDE_DIRS 0200 ${CMAKE_CURRENT_BINARY_DIR} 0201 BLANK_MACROS 0202 KWINDOWSYSTEM_EXPORT 0203 KWINDOWSYSTEM_DEPRECATED 0204 KWINDOWSYSTEM_DEPRECATED_EXPORT 0205 "KWINDOWSYSTEM_DEPRECATED_VERSION(x, y, t)" 0206 "KWINDOWSYSTEM_DEPRECATED_VERSION_BELATED(x, y, xt, yt, t)" 0207 "KWINDOWSYSTEM_ENUMERATOR_DEPRECATED_VERSION(x, y, t)" 0208 "KWINDOWSYSTEM_ENUMERATOR_DEPRECATED_VERSION_BELATED(x, y, xt, yt, t)" 0209 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0210 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0211 COMPONENT Devel 0212 ) 0213 endif() 0214 0215 add_subdirectory(platforms) 0216 0217 ecm_qt_install_logging_categories( 0218 EXPORT KWINDOWSYSTEM 0219 FILE kwindowsystem.categories 0220 DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 0221 ) 0222 0223 include(ECMGeneratePriFile) 0224 ecm_generate_pri_file(BASE_NAME KWindowSystem LIB_NAME KF5WindowSystem DEPS "gui" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KWindowSystem) 0225 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})