diff options
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 43 | ||||
-rw-r--r-- | kwin/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kwin/kompmgr/CMakeLists.txt | 38 |
4 files changed, 52 insertions, 34 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 559ee8cc5..8da3cd8f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,9 @@ option( WITH_XCOMPOSITE "Enable xcomposite support" OFF ) option( WITH_XCURSOR "Enable xcursor support" OFF ) option( WITH_XFIXES "Enable xfixes support" OFF ) option( WITH_XRANDR "Enable xrandr support" OFF ) +option( WITH_XRENDER "Enable xrender support" OFF ) +option( WITH_XDAMAGE "Enable xdamage support" OFF ) +option( WITH_XEXT "Enable xext support" OFF ) option( WITH_LIBUSB "Enable control of some mouse models through libusb" OFF ) option( WITH_LIBRAW1394 "Enable visualization of ieee1394 devices through libraw1394" OFF ) option( WITH_SUDO_KDESU_BACKEND "Use sudo as backend for kdesu (default is su)" OFF ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c85d32a32..f35de0c3a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -44,11 +44,13 @@ if( BUILD_KSMSERVER OR (WITH_HAL AND BUILD_KIOSLAVES)) endif( ) -# xrender (kdesktop, konsole, kcontrol, kicker) -if( BUILD_KDESKTOP OR BUILD_KONSOLE OR BUILD_KCONTROL OR BUILD_KICKER ) +# xrender (kdesktop, konsole, kcontrol, kicker, kwin) +if( WITH_XRENDER OR BUILD_KDESKTOP OR BUILD_KONSOLE OR BUILD_KCONTROL OR BUILD_KICKER ) pkg_search_module( XRENDER xrender ) if( XRENDER_FOUND ) set( HAVE_XRENDER 1 ) + elseif( WITH_XRENDER ) + tde_message_fatal( "xrender is requested, but was not found on your system" ) endif( ) endif( ) @@ -57,20 +59,49 @@ endif( ) if( WITH_XCURSOR ) pkg_search_module( XCURSOR xcursor ) if( XCURSOR_FOUND ) - set( HAVE_XCURSOR 1 CACHE INTERNAL "" FORCE ) + set( HAVE_XCURSOR 1 ) else( ) - tde_message_fatal( "xcursor are requested, but not found on your system" ) + tde_message_fatal( "xcursor is requested, but was not found on your system" ) endif( ) endif( ) -# xfixes (klipper) +# xcomposite (kicker, kwin) +if( WITH_XCOMPOSITE ) + pkg_search_module( XCOMPOSITE xcomposite ) + if( XCOMPOSITE_FOUND ) + set( HAVE_XCOMPOSITE 1 ) + else( XCOMPOSITE_FOUND ) + tde_message_fatal( "xcomposite is requested, but was not found on your system" ) + endif( XCOMPOSITE_FOUND ) +endif( ) + + +# xfixes (klipper, kicker) if( WITH_XFIXES ) pkg_search_module( XFIXES xfixes ) if( XFIXES_FOUND ) set( HAVE_XFIXES 1 CACHE INTERNAL "" FORCE ) else( ) - tde_message_fatal( "xfixes are requested, but not found on your system" ) + tde_message_fatal( "xfixes is requested, but was not found on your system" ) + endif( ) +endif( ) + + +# xdamage (kwin/kompmgr) +if( WITH_XDAMAGE ) + pkg_search_module( XDAMAGE xdamage ) + if( NOT XDAMAGE_FOUND ) + tde_message_fatal( "xdamage is requested, but was not found on your system" ) + endif( ) +endif( ) + + +# xext (kwin/kompmgr) +if( WITH_XEXT ) + pkg_search_module( XEXT xext ) + if( NOT XEXT_FOUND ) + tde_message_fatal( "xext is requested, but was not found on your system" ) endif( ) endif( ) diff --git a/kwin/CMakeLists.txt b/kwin/CMakeLists.txt index 9dbcd8293..4eb23b7d2 100644 --- a/kwin/CMakeLists.txt +++ b/kwin/CMakeLists.txt @@ -16,7 +16,7 @@ add_subdirectory( pics ) add_subdirectory( clients ) add_subdirectory( oldheaders ) add_subdirectory( data ) -add_subdirectory( kompmgr ) +tde_conditional_add_subdirectory( WITH_XCOMPOSITE kompmgr ) include_directories( diff --git a/kwin/kompmgr/CMakeLists.txt b/kwin/kompmgr/CMakeLists.txt index d45eb655f..0cc2e5616 100644 --- a/kwin/kompmgr/CMakeLists.txt +++ b/kwin/kompmgr/CMakeLists.txt @@ -9,35 +9,19 @@ # ################################################# -##### check for xcomposite ###################### -if( WITH_XCOMPOSITE ) +if( NOT WITH_XRENDER ) + tde_message_fatal( "xrender support is needed to build kompmgr.\n Pass -DWITH_XRENDER=ON to cmake arguments." ) +elseif( NOT WITH_XFIXES ) + tde_message_fatal( "xfixes support is needed to build kompmgr.\n Pass -DWITH_XFIXES=ON to cmake arguments." ) +elseif( NOT WITH_XDAMAGE ) + tde_message_fatal( "xdamage support is needed to build kompmgr.\n Pass -DWITH_XDAMAGE=ON to cmake arguments." ) +elseif( NOT WITH_XEXT ) + tde_message_fatal( "xext support is needed to build kompmgr.\n Pass -DWITH_XEXT=ON to cmake arguments." ) +endif( ) - pkg_search_module( XCOMPOSITE xcomposite ) - if( XCOMPOSITE_FOUND ) - set( HAVE_XCOMPOSITE 1 CACHE INTERNAL "" ) - else( XCOMPOSITE_FOUND ) - message(FATAL_ERROR "\nxcomposite are requested, but not found on your system" ) - endif( XCOMPOSITE_FOUND ) - - pkg_search_module( XFIXES xfixes ) - if( XFIXES_FOUND ) - set( HAVE_XFIXES 1 CACHE INTERNAL "" ) - else( XFIXES_FOUND ) - message(FATAL_ERROR "\nxfixes are required, but not found on your system" ) - endif( XFIXES_FOUND ) - - pkg_search_module( XDAMAGE xdamage ) - if( XDAMAGE_FOUND ) - set( HAVE_XDAMAGE 1 CACHE INTERNAL "" ) - else( XDAMAGE_FOUND ) - message(FATAL_ERROR "\nxdamage are required, but not found on your system" ) - endif( XDAMAGE_FOUND ) - -endif( WITH_XCOMPOSITE ) include_directories( - ${CMAKE_CURRENT_BINARY_DIR} ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} ) @@ -49,8 +33,8 @@ link_directories( ##### kompmgr (executable) ####################### -tde_add_executable( kompmgr AUTOMOC +tde_add_executable( kompmgr SOURCES kompmgr.c - LINK m X11 ${XFIXES_LIBRARIES} ${XRENDER_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ${XDAMAGE_LIBRARIES} + LINK m ${XRENDER_LIBRARIES} ${XFIXES_LIBRARIES} ${XDAMAGE_LIBRARIES} ${XEXT_LIBRARIES} ${XCOMPOSITE_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) |