1 2 3 4 5 6 7 8 9 10 11
# a simple C only test case PROJECT (X11 C) INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake) IF(CMAKE_HAS_X) INCLUDE_DIRECTORIES(${CMAKE_X_CFLAGS}) ADD_EXECUTABLE (X11 X11.c) TARGET_LINK_LIBRARIES(X11 ${CMAKE_X_LIBS}) ENDIF(CMAKE_HAS_X)