Added explicit include directories for OpenGL and X11 in CMake files
This commit is contained in:
parent
a547acfeb7
commit
d58d6e51bc
5 changed files with 7 additions and 1 deletions
|
@ -72,7 +72,7 @@ if(MACOSX)
|
|||
endif()
|
||||
|
||||
# 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
|
||||
# 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_package(OpenGL REQUIRED)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
if(LINUX)
|
||||
find_package(X11 REQUIRED)
|
||||
if(NOT X11_Xrandr_FOUND)
|
||||
message(FATAL_ERROR "Xrandr library not found")
|
||||
endif()
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
# build the list of external libraries to link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue