CMake/Tests/X11/CMakeLists.txt

13 lines
289 B
CMake

# a simple C only test case
PROJECT (UseX11 C)
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
ADD_EXECUTABLE (UseX11 X11.c)
IF(CMAKE_HAS_X)
ADD_DEFINITIONS(-DCMAKE_HAS_X)
INCLUDE_DIRECTORIES(${CMAKE_X_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(UseX11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)