CMake/Tests/X11/CMakeLists.txt

13 lines
284 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(${X11_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(UseX11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)