mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Added explicit include directories for OpenGL and X11 in CMake files
This commit is contained in:
parent
a547acfeb7
commit
d58d6e51bc
@ -6,7 +6,9 @@ set(SRC ${SRCROOT}/X11.cpp)
|
|||||||
|
|
||||||
# find OpenGL, GLU and X11
|
# find OpenGL, GLU and X11
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
|
include_directories(${X11_INCLUDE_DIR})
|
||||||
|
|
||||||
# define the X11 target
|
# define the X11 target
|
||||||
sfml_add_example(X11 GUI_APP
|
sfml_add_example(X11 GUI_APP
|
||||||
|
@ -6,6 +6,7 @@ set(SRC ${SRCROOT}/OpenGL.cpp)
|
|||||||
|
|
||||||
# find OpenGL and GLU
|
# find OpenGL and GLU
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
# define the opengl target
|
# define the opengl target
|
||||||
sfml_add_example(opengl GUI_APP
|
sfml_add_example(opengl GUI_APP
|
||||||
|
@ -6,6 +6,7 @@ set(SRC ${SRCROOT}/Window.cpp)
|
|||||||
|
|
||||||
# find OpenGL and GLU
|
# find OpenGL and GLU
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
# define the window target
|
# define the window target
|
||||||
sfml_add_example(window GUI_APP
|
sfml_add_example(window GUI_APP
|
||||||
|
@ -72,7 +72,7 @@ if(MACOSX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add include paths of external libraries
|
# add include paths of external libraries
|
||||||
include_directories(${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${JPEG_INCLUDE_DIR})
|
include_directories(${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_PATH} ${JPEG_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
# build the list of libraries to link
|
# build the list of libraries to link
|
||||||
# GL and X11 are only needed for shared build, as they are already linked by sfml-window
|
# GL and X11 are only needed for shared build, as they are already linked by sfml-window
|
||||||
|
@ -98,11 +98,13 @@ endif()
|
|||||||
|
|
||||||
# find external libraries
|
# find external libraries
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
if(LINUX)
|
if(LINUX)
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
if(NOT X11_Xrandr_FOUND)
|
if(NOT X11_Xrandr_FOUND)
|
||||||
message(FATAL_ERROR "Xrandr library not found")
|
message(FATAL_ERROR "Xrandr library not found")
|
||||||
endif()
|
endif()
|
||||||
|
include_directories(${X11_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# build the list of external libraries to link
|
# build the list of external libraries to link
|
||||||
|
Loading…
Reference in New Issue
Block a user