From 415d45525c4d6bd6954a58995ef32108ccc25fb3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 20 Jun 2008 19:52:14 +0000 Subject: [PATCH] Changed the include/osg/Config and include/OpenThreads/Config references to use the assocaited CMake variable for these headers --- CMakeLists.txt | 15 ++++++++++----- src/OpenThreads/CMakeLists.txt | 20 +++++++++++++------- src/osg/CMakeLists.txt | 2 +- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99aaba382..d3cba5c8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,6 +194,16 @@ MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGSPHERE) OPTION(OSG_USE_FLOAT_BOUNDINGBOX "Set to ON to build OpenSceneGraph with float BoundingBox instead of double." ON) MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGBOX) + +################################################################################ +# Set Config file + +SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config") +CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in" + "${OPENSCENEGRAPH_CONFIG_HEADER}") +INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}") + + ################################################################################ # 3rd Party Dependency Stuff IF(WIN32) @@ -584,11 +594,6 @@ IF(BUILD_DOCUMENTATION) ) ENDIF(BUILD_DOCUMENTATION) -SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config") -CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in" - "${OPENSCENEGRAPH_CONFIG_HEADER}") -INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}") - # This needs to be run very last so other parts of the scripts can take # advantage of this. IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) diff --git a/src/OpenThreads/CMakeLists.txt b/src/OpenThreads/CMakeLists.txt index b59db52b1..879fccd9e 100644 --- a/src/OpenThreads/CMakeLists.txt +++ b/src/OpenThreads/CMakeLists.txt @@ -9,6 +9,18 @@ SET(OPENTHREADS_SOVERSION 11) SET(OPENTHREADS_VERSION ${OPENTHREADS_MAJOR_VERSION}.${OPENTHREADS_MINOR_VERSION}.${OPENTHREADS_PATCH_VERSION}) +INCLUDE(CheckAtomicOps) + +################################################################################ +# Set Config file + +SET(OPENTHREADS_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/OpenThreads/Config") +CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/common/Config.in" + "${OPENTHREADS_CONFIG_HEADER}") +INSTALL_FILES(/include/OpenThreads/ FILES "${OPENTHREADS_CONFIG_HEADER}") + +################################################################################ + SET(HEADER_PATH ${OpenThreads_SOURCE_DIR}/include/OpenThreads) SET(OpenThreads_PUBLIC_HEADERS ${HEADER_PATH}/Atomic @@ -22,6 +34,7 @@ SET(OpenThreads_PUBLIC_HEADERS ${HEADER_PATH}/ScopedLock ${HEADER_PATH}/Thread ${HEADER_PATH}/Version + ${OPENTHREADS_CONFIG_HEADER} ) # User Options @@ -69,12 +82,5 @@ ELSE(WIN32) ENDIF(UNIX) ENDIF(WIN32) -INCLUDE(CheckAtomicOps) - -SET(OPENTHREADS_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/OpenThreads/Config") -CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/common/Config.in" - "${OPENTHREADS_CONFIG_HEADER}") -INSTALL_FILES(/include/OpenThreads/ FILES "${OPENTHREADS_CONFIG_HEADER}") - # Make sure everyone can find Config INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include) diff --git a/src/osg/CMakeLists.txt b/src/osg/CMakeLists.txt index 60ef6304e..52db498c2 100644 --- a/src/osg/CMakeLists.txt +++ b/src/osg/CMakeLists.txt @@ -37,7 +37,6 @@ SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/ColorMask ${HEADER_PATH}/ColorMatrix ${HEADER_PATH}/ComputeBoundsVisitor - ${HEADER_PATH}/Config ${HEADER_PATH}/ConvexPlanarOccluder ${HEADER_PATH}/ConvexPlanarPolygon ${HEADER_PATH}/CoordinateSystemNode @@ -170,6 +169,7 @@ SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/VertexProgram ${HEADER_PATH}/View ${HEADER_PATH}/Viewport + ${OPENSCENEGRAPH_CONFIG_HEADER} ) ADD_LIBRARY(${LIB_NAME}