From d58d6e51bc1c7eff6f47753846b5d21bd10fcb01 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 30 Sep 2011 13:43:52 +0200 Subject: [PATCH] Added explicit include directories for OpenGL and X11 in CMake files --- examples/X11/CMakeLists.txt | 2 ++ examples/opengl/CMakeLists.txt | 1 + examples/window/CMakeLists.txt | 1 + src/SFML/Graphics/CMakeLists.txt | 2 +- src/SFML/Window/CMakeLists.txt | 2 ++ 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/X11/CMakeLists.txt b/examples/X11/CMakeLists.txt index 4ffba281..d63ca9fc 100644 --- a/examples/X11/CMakeLists.txt +++ b/examples/X11/CMakeLists.txt @@ -6,7 +6,9 @@ set(SRC ${SRCROOT}/X11.cpp) # find OpenGL, GLU and X11 find_package(OpenGL REQUIRED) +include_directories(${OPENGL_INCLUDE_DIR}) find_package(X11 REQUIRED) +include_directories(${X11_INCLUDE_DIR}) # define the X11 target sfml_add_example(X11 GUI_APP diff --git a/examples/opengl/CMakeLists.txt b/examples/opengl/CMakeLists.txt index b4402b35..5a699b6f 100644 --- a/examples/opengl/CMakeLists.txt +++ b/examples/opengl/CMakeLists.txt @@ -6,6 +6,7 @@ set(SRC ${SRCROOT}/OpenGL.cpp) # find OpenGL and GLU find_package(OpenGL REQUIRED) +include_directories(${OPENGL_INCLUDE_DIR}) # define the opengl target sfml_add_example(opengl GUI_APP diff --git a/examples/window/CMakeLists.txt b/examples/window/CMakeLists.txt index ed3665c4..a9edafa5 100644 --- a/examples/window/CMakeLists.txt +++ b/examples/window/CMakeLists.txt @@ -6,6 +6,7 @@ set(SRC ${SRCROOT}/Window.cpp) # find OpenGL and GLU find_package(OpenGL REQUIRED) +include_directories(${OPENGL_INCLUDE_DIR}) # define the window target sfml_add_example(window GUI_APP diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt index 09daa851..5597ff22 100644 --- a/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt @@ -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 diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt index b332b351..77b6a8b8 100644 --- a/src/SFML/Window/CMakeLists.txt +++ b/src/SFML/Window/CMakeLists.txt @@ -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