blob: a4cc12312ce72e3cad2c2cec9f94df587252b286 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# a simple C only test case
PROJECT (X11 C)
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
IF(CMAKE_HAS_X)
IF(CMAKE_X_CFLAGS)
SET(CMAKE_C_FLAGS "${CMAKE_X_CFLAGS} ${CMAKE_C_FLAGS}")
ENDIF(CMAKE_X_CFLAGS)
INCLUDE_DIRECTORIES(${CMAKE_X11_INCLUDES})
ADD_DEFINITIONS(-DCMAKE_HAS_X)
ENDIF(CMAKE_HAS_X)
ADD_EXECUTABLE (X11 X11.c)
IF(CMAKE_HAS_X)
TARGET_LINK_LIBRARIES(X11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)
|