Make xcb-icccm truely optional
ICCCM dependency is a beast due to two different existing versions in different packages. Thus it cannot be a hard dep without causing problems for our downstreams. This change ensures that ICCCM is really considered as an optional dep and that the version we need is found, if not we mark it as non-found. ICCCM is only used by one test application which can easily be disabled and some enum values are used in events.cpp. If ICCCM is not found those are replaced by defines generated in config-kwin.h. BUG: 336035
This commit is contained in:
parent
0c4aaaf4ad
commit
060c93233e
3 changed files with 28 additions and 14 deletions
|
@ -138,24 +138,29 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
|
|||
)
|
||||
|
||||
# All the required XCB components
|
||||
find_package(XCB REQUIRED COMPONENTS
|
||||
XCB
|
||||
XFIXES
|
||||
DAMAGE
|
||||
COMPOSITE
|
||||
SHAPE
|
||||
SYNC
|
||||
RENDER
|
||||
RANDR
|
||||
KEYSYMS
|
||||
IMAGE
|
||||
SHM
|
||||
XTEST
|
||||
find_package(XCB
|
||||
REQUIRED COMPONENTS
|
||||
XCB
|
||||
XFIXES
|
||||
DAMAGE
|
||||
COMPOSITE
|
||||
SHAPE
|
||||
SYNC
|
||||
RENDER
|
||||
RANDR
|
||||
KEYSYMS
|
||||
IMAGE
|
||||
SHM
|
||||
XTEST
|
||||
OPTIONAL_COMPONENTS
|
||||
ICCCM
|
||||
)
|
||||
set_package_properties(XCB PROPERTIES TYPE REQUIRED)
|
||||
|
||||
# and the optional XCB dependencies
|
||||
find_package(XCB COMPONENTS ICCCM)
|
||||
if (XCB_ICCCM_VERSION VERSION_LESS "0.4")
|
||||
set(XCB_ICCCM_FOUND FALSE)
|
||||
endif()
|
||||
add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
|
|
@ -17,3 +17,10 @@
|
|||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
|
||||
#cmakedefine XCB_ICCCM_FOUND 1
|
||||
#ifndef XCB_ICCCM_FOUND
|
||||
#define XCB_ICCCM_WM_STATE_WITHDRAWN 0
|
||||
#define XCB_ICCCM_WM_STATE_NORMAL 1
|
||||
#define XCB_ICCCM_WM_STATE_ICONIC 3
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kkeyserver.h>
|
||||
|
||||
#include <xcb/sync.h>
|
||||
#ifdef XCB_ICCCM_FOUND
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#endif
|
||||
|
||||
#include "composite.h"
|
||||
#include "killwindow.h"
|
||||
|
|
Loading…
Reference in a new issue