summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-29 20:54:40 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-29 20:54:40 (GMT)
commita43958f4f0f3797e9eb76cb9b93d3bf5b4d2fab2 (patch)
treefe61b1f9dc385a9b2e7652528576c248cb870ced /Tests
parent2d9330fa1d5b20aba6ebce5109bc2e310fab4b23 (diff)
downloadCMake-a43958f4f0f3797e9eb76cb9b93d3bf5b4d2fab2.zip
CMake-a43958f4f0f3797e9eb76cb9b93d3bf5b4d2fab2.tar.gz
CMake-a43958f4f0f3797e9eb76cb9b93d3bf5b4d2fab2.tar.bz2
Add Windows code
Diffstat (limited to 'Tests')
-rw-r--r--Tests/X11/CMakeLists.txt6
-rw-r--r--Tests/X11/X11.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt
index d97b4fb..bc2294e 100644
--- a/Tests/X11/CMakeLists.txt
+++ b/Tests/X11/CMakeLists.txt
@@ -5,7 +5,11 @@ INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
IF(CMAKE_HAS_X)
INCLUDE_DIRECTORIES(${CMAKE_X_CFLAGS})
+ ADD_DEFINITIONS(-DCMAKE_HAS_X)
+ENDIF(CMAKE_HAS_X)
+
+ADD_EXECUTABLE (X11 X11.c)
- ADD_EXECUTABLE (X11 X11.c)
+IF(CMAKE_HAS_X)
TARGET_LINK_LIBRARIES(X11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)
diff --git a/Tests/X11/X11.c b/Tests/X11/X11.c
index b877b31..fae9999 100644
--- a/Tests/X11/X11.c
+++ b/Tests/X11/X11.c
@@ -1,3 +1,5 @@
+#ifdef CMAKE_HAS_X
+
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -36,3 +38,11 @@ char **argv;
}
+#else
+
+int main()
+{
+ return 0;
+}
+
+#endif