From 711ff288fa939c7cefa7bb9a81ded2a5a10a5f8f Mon Sep 17 00:00:00 2001 From: gregory guy Date: Thu, 24 Sep 2020 15:26:15 +0200 Subject: Add definitions for X11_RGBFILE and XMLLINT in config.h Signed-off-by: gregory guy (cherry picked from commit 2706c5674eb1ea3fffdca4d8c3edb3b25335e731) --- CMakeLists.txt | 24 ++++++++++++++++++++++++ kdeui/kcolordialog.cpp | 6 +++--- kdoctools/meinproc.cpp | 5 ++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26e312d65..3a6eac81f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1106,6 +1106,30 @@ if( NOT WIN32 AND NOT ICEAUTH_PATH ) endif( NOT WIN32 AND NOT ICEAUTH_PATH ) +##### find the rgb.txt file + +message( STATUS "Looking for rgb.txt" ) +find_file( PATH_RGB rgb.txt + PATHS + /usr/share/X11 + /usr/X11R6/lib/X11 + /usr/openwin/lib/X11 +) +if( PATH_RGB ) + message( STATUS "Found rgb.txt file: ${PATH_RGB}" ) + set( X11_RGBFILE "${PATH_RGB}" ) +endif() + + +##### Look for xmllint + +find_program( XMLLINT_EXE xmllint ) +if( XMLLINT_EXE ) + set( XMLLINT "${XMLLINT_EXE}" ) + message( STATUS "Found xmllint: ${XMLLINT}" ) +endif() + + ##### write configure files ##################### configure_file( config.h.cmake config.h ) diff --git a/kdeui/kcolordialog.cpp b/kdeui/kcolordialog.cpp index 84385dd33..71b17de0f 100644 --- a/kdeui/kcolordialog.cpp +++ b/kdeui/kcolordialog.cpp @@ -64,7 +64,10 @@ #include #include +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #ifdef Q_WS_X11 #include @@ -626,9 +629,6 @@ static const char * const *namedColorFilePath( void ) #ifdef X11_RGBFILE X11_RGBFILE, #endif - "/usr/share/X11/rgb.txt", - "/usr/X11R6/lib/X11/rgb.txt", - "/usr/openwin/lib/X11/rgb.txt", // for Solaris. 0 }; return path; diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index 4becdc859..2ab40d3c7 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -1,4 +1,7 @@ -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include -- cgit v1.2.1