ERR: Fix test to use post CMAKE_X_LIBS variables

This commit is contained in:
Andy Cedilnik 2004-07-29 11:11:05 -04:00
parent e52dc31185
commit 8e13e2de90
1 changed files with 4 additions and 3 deletions

View File

@ -2,11 +2,12 @@
PROJECT (UseX11 C)
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
MESSAGE("X11_FOUND: ${X11_FOUND}")
ADD_EXECUTABLE (UseX11 X11.c)
IF(CMAKE_HAS_X)
IF(X11_FOUND)
ADD_DEFINITIONS(-DCMAKE_HAS_X)
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(UseX11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)
TARGET_LINK_LIBRARIES(UseX11 ${X11_LIBRARIES})
ENDIF(X11_FOUND)