summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-01-02 14:57:59 (GMT)
committerBrad King <brad.king@kitware.com>2003-01-02 14:57:59 (GMT)
commit0a14f697551009e6dc41e97259f944d4c1dd9c1d (patch)
treefee8d394cfd406db5101ffdacca3ab30d4017c9d
parent204308132fc1567f40ee77072342078bcec97b67 (diff)
downloadCMake-0a14f697551009e6dc41e97259f944d4c1dd9c1d.zip
CMake-0a14f697551009e6dc41e97259f944d4c1dd9c1d.tar.gz
CMake-0a14f697551009e6dc41e97259f944d4c1dd9c1d.tar.bz2
BUG: Don't add -I/usr/include as an X_CFLAGS setting.
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index a96f953..c15a9a9 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -28,8 +28,12 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
- SET (CMAKE_X_CFLAGS "-I${CMAKE_X11_INCLUDE_PATH}" CACHE STRING
- "X11 extra flags.")
+ IF("${CMAKE_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
+ SET (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
+ ELSE("${CMAKE_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
+ SET (CMAKE_X_CFLAGS "-I${CMAKE_X11_INCLUDE_PATH}" CACHE STRING
+ "X11 extra flags.")
+ ENDIF("${CMAKE_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_LIBS "${CMAKE_X_LIBS}" CACHE STRING
"Libraries and options used in X11 programs.")
SET (CMAKE_HAS_X "${CMAKE_HAS_X}" CACHE INTERNAL "Is X11 around.")