1 # a simple C only test case
4 INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
5 MESSAGE("X11_FOUND: ${X11_FOUND}")
7 ADD_EXECUTABLE (UseX11 X11.c)
9 # so for universal binaries this test will fail if
12 LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUMARCH)
14 IF(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib)
16 MESSAGE("disable X11, because of universal binary and sysroot")
17 ENDIF(NOT EXISTS /usr/X11R6/lib//libSM.6.dylib)
18 ENDIF(NUMARCH GREATER 1)
22 ADD_DEFINITIONS(-DCMAKE_HAS_X)
23 INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
24 TARGET_LINK_LIBRARIES(UseX11 ${X11_LIBRARIES})