Try to fix FindX11
This commit is contained in:
parent
14ab03ff69
commit
8ac50c4aad
|
@ -24,6 +24,35 @@ IF (UNIX)
|
||||||
/opt/graphics/OpenGL/include
|
/opt/graphics/OpenGL/include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FIND_PATH(CMAKE_Xlib_INCLUDE_PATH X11/Xlib.h
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/usr/openwin/include
|
||||||
|
/usr/openwin/share/include
|
||||||
|
/usr/X11R6/include
|
||||||
|
/usr/include/X11
|
||||||
|
/opt/graphics/OpenGL/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(CMAKE_Xutil_INCLUDE_PATH X11/Xutil.h
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/usr/openwin/include
|
||||||
|
/usr/openwin/share/include
|
||||||
|
/usr/X11R6/include
|
||||||
|
/usr/include/X11
|
||||||
|
/opt/graphics/OpenGL/include
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(CMAKE_X11_INCLUDE_PATH)
|
||||||
|
SET(CMAKE_X11_INCLUDES "${CMAKE_X11_INCLUDES};${CMAKE_X11_INCLUDE_PATH}")
|
||||||
|
ENDIF(CMAKE_X11_INCLUDE_PATH)
|
||||||
|
IF(CMAKE_Xlib_INCLUDE_PATH)
|
||||||
|
SET(CMAKE_X11_INCLUDES "${CMAKE_X11_INCLUDES};${CMAKE_Xlib_INCLUDE_PATH}")
|
||||||
|
ENDIF(CMAKE_Xlib_INCLUDE_PATH)
|
||||||
|
IF(CMAKE_Xutil_INCLUDE_PATH)
|
||||||
|
SET(CMAKE_X11_INCLUDES "${CMAKE_X11_INCLUDES};${CMAKE_Xutil_INCLUDE_PATH}")
|
||||||
|
ENDIF(CMAKE_Xutil_INCLUDE_PATH)
|
||||||
|
|
||||||
FIND_LIBRARY(CMAKE_X11_LIBDIR X11
|
FIND_LIBRARY(CMAKE_X11_LIBDIR X11
|
||||||
/usr/lib
|
/usr/lib
|
||||||
|
|
|
@ -4,7 +4,11 @@ PROJECT (X11 C)
|
||||||
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
|
INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
|
||||||
|
|
||||||
IF(CMAKE_HAS_X)
|
IF(CMAKE_HAS_X)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_X_CFLAGS})
|
IF(CMAKE_X_CFLAGS)
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_X_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||||
|
ENDIF(CMAKE_X_CFLAGS)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${CMAKE_X11_INCLUDES})
|
||||||
ADD_DEFINITIONS(-DCMAKE_HAS_X)
|
ADD_DEFINITIONS(-DCMAKE_HAS_X)
|
||||||
ENDIF(CMAKE_HAS_X)
|
ENDIF(CMAKE_HAS_X)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue