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."
This commit is contained in:
Robert Osfield 2010-03-01 11:29:19 +00:00
parent 3d6b53b218
commit 60dd9ad7d0

View File

@ -158,16 +158,16 @@ IF(UNIX)
ENDIF( CMAKE_SYSTEM MATCHES "Linux" ) ENDIF( CMAKE_SYSTEM MATCHES "Linux" )
ENDIF() 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( INCLUDE_DIRECTORIES(
${OpenSceneGraph_SOURCE_DIR}/include ${OpenSceneGraph_SOURCE_DIR}/include
${OPENGL_INCLUDE_DIR} ${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 # Common global definitions
#ADD_DEFINITIONS(-D) #ADD_DEFINITIONS(-D)
# Platform specific definitions # Platform specific definitions