From 60dd9ad7d03ef396884c743a3eb94b2b05d74f07 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 1 Mar 2010 11:29:19 +0000 Subject: [PATCH] From Mourad Boufarguine, "With the present CMakeLists, the directory ${PROJECT_BINARY_DIR}/include is added to the include path before ${OpenSceneGraph_SOURCE_DIR}/include. This causes problems whenever a header file is changed when updating OSG, because cpp files are build against the old header files contained in ${PROJECT_BINARY_DIR}/include rather than the new ones in ${OpenSceneGraph_SOURCE_DIR}/include. Inverting the order of the two drectories in the include path solves the problem. Attached is the modified CMakeLists.txt." --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e88e451a4..2856854ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,16 +158,16 @@ IF(UNIX) ENDIF( CMAKE_SYSTEM MATCHES "Linux" ) ENDIF() -# Make the headers visible to everything -IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR}) - INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include) -ENDIF() - INCLUDE_DIRECTORIES( ${OpenSceneGraph_SOURCE_DIR}/include ${OPENGL_INCLUDE_DIR} ) +# Make the headers visible to everything +IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include) +ENDIF() + # Common global definitions #ADD_DEFINITIONS(-D) # Platform specific definitions