diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-04-01 17:23:51 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-04-01 17:53:09 +0300 |
commit | d3a391bcd6212e7841f5388921ad1640e5cd6dbd (patch) | |
tree | 907572fd58dcceb87c3e59dd8d14d75aefa32edd | |
parent | 08cff8ad058fdd63303d2b1b218f73b26dfc7921 (diff) | |
download | kompose-d3a391bcd6212e7841f5388921ad1640e5cd6dbd.tar.gz kompose-d3a391bcd6212e7841f5388921ad1640e5cd6dbd.zip |
Added XCOMPOSITE and XDAMAGE checks to CMake rules.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 16 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6def290..93d603e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ tde_setup_paths( ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) +option( WITH_XCOMPOSITE "Enable xcomposite support" ON ) ##### user requested modules #################### diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 0d81d2a..c371ab2 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -33,6 +33,22 @@ endif( WITH_GCC_VISIBILITY ) find_package( X11 ) +##### check for XCOMPOSITE and XDAMAGE (needed for XCOMPOSITE) +if( WITH_XCOMPOSITE ) + pkg_search_module( XDAMAGE xdamage ) + if( NOT XDAMAGE_FOUND ) + tde_message_fatal( "xcomposite support was requested, but xdamage was not found on your system" ) + endif() + + pkg_search_module( XCOMPOSITE xcomposite ) + if( XCOMPOSITE_FOUND ) + set( COMPOSITE 1 ) + else() + tde_message_fatal( "xcomposite support was requested, but xcomposite was not found on your system" ) + endif() +endif( WITH_XCOMPOSITE ) + + ##### check for imlib2 pkg_search_module( IMLIB2 imlib2 ) diff --git a/config.h.cmake b/config.h.cmake index 67860c5..40181ed 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -10,3 +10,6 @@ /* Defined if you don't have either the XTest headers or the xcb-util-keysyms headers */ #cmakedefine NO_XTEST_EXTENSION 1 + +// Defined if you have both XComposite and XDamage. +#cmakedefine COMPOSITE 1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bb3f3e..f657a81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,6 +28,8 @@ tde_add_executable( ${PROJECT_NAME} AUTOMOC tdecore-shared tdeui-shared ${IMLIB2_LIBRARIES} + ${XDAMAGE_LIBRARIES} + ${XCOMPOSITE_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) |