From 6903d9ca2305e158a797f688f997f24239e366c7 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Fri, 26 Mar 2010 03:35:34 +0000 Subject: [PATCH] Move cpp conditional check for AVOID_XKB to CMake. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1107581 --- src/CMakeLists.txt | 6 ++++++ src/Vt102Emulation.cpp | 3 --- src/config-konsole.h.cmake | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 784599a4..ae147b1b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,12 @@ include(CheckIncludeFiles) check_include_files("sys/proc.h" HAVE_SYS_PROC_H) check_include_files("sys/proc_info.h" HAVE_SYS_PROC_INFO_H) +if (APPLE OR OSF) + SET(HAVE_AVOID_XKB TRUE) +endif (APPLE OR OSF) + +macro_bool_to_01(HAVE_AVOID_XKB AVOID_XKB) + configure_file (config-konsole.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konsole.h ) ############### Load the CTest options ############### diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 8d3fd1f0..9fe95d17 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -25,9 +25,6 @@ // XKB #include -#if defined(__osf__) || defined(__APPLE__) - #define AVOID_XKB -#endif // this allows konsole to be compiled without XKB and XTEST extensions // even though it might be available on a particular system. diff --git a/src/config-konsole.h.cmake b/src/config-konsole.h.cmake index 03fe052a..1a2474da 100644 --- a/src/config-konsole.h.cmake +++ b/src/config-konsole.h.cmake @@ -12,3 +12,6 @@ /* Defined if you have sys/proc_info.h */ #cmakedefine HAVE_SYS_PROC_INFO_H 1 + +/* Define if you have the do NOT want the XKB extension */ +#cmakedefine AVOID_XKB 1 -- GitLab