From Mathias Froehlich, moved optional config variables into include/osg/Config file that
is automatically created by cmake according to its own settings.
This commit is contained in:
parent
7b19b987ec
commit
a71939c5bb
@ -184,27 +184,15 @@ ENDIF(WIN32)
|
||||
|
||||
OPTION(OSG_USE_FLOAT_MATRIX "Set to ON to build OpenSceneGraph with float Matrix instead of double." OFF)
|
||||
MARK_AS_ADVANCED(OSG_USE_FLOAT_MATRIX)
|
||||
IF(OSG_USE_FLOAT_MATRIX)
|
||||
ADD_DEFINITIONS(-DOSG_USE_FLOAT_MATRIX)
|
||||
ENDIF(OSG_USE_FLOAT_MATRIX)
|
||||
|
||||
OPTION(OSG_USE_FLOAT_PLANE "Set to ON to build OpenSceneGraph with float Plane instead of double." OFF)
|
||||
MARK_AS_ADVANCED(OSG_USE_FLOAT_PLANE)
|
||||
IF(OSG_USE_FLOAT_PLANE)
|
||||
ADD_DEFINITIONS(-DOSG_USE_FLOAT_PLANE)
|
||||
ENDIF(OSG_USE_FLOAT_PLANE)
|
||||
|
||||
OPTION(OSG_USE_FLOAT_BOUNDINGSPHERE "Set to ON to build OpenSceneGraph with float BoundingSphere instead of double." ON)
|
||||
MARK_AS_ADVANCED(OSG_USE_FLOAT_BOUNDINGSPHERE)
|
||||
IF(NOT OSG_USE_FLOAT_BOUNDINGSPHERE)
|
||||
ADD_DEFINITIONS(-DOSG_USE_DOUBLE_BOUNDINGSPHERE)
|
||||
ENDIF(NOT 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)
|
||||
IF(NOT OSG_USE_FLOAT_BOUNDINGBOX)
|
||||
ADD_DEFINITIONS(-DOSG_USE_DOUBLE_BOUNDINGBOX)
|
||||
ENDIF(NOT OSG_USE_FLOAT_BOUNDINGBOX)
|
||||
|
||||
################################################################################
|
||||
# 3rd Party Dependency Stuff
|
||||
@ -596,6 +584,11 @@ 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)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#ifndef OSG_BOUNDINGBOX
|
||||
#define OSG_BOUNDINGBOX 1
|
||||
|
||||
#include <osg/Config>
|
||||
#include <osg/Export>
|
||||
#include <osg/Vec3>
|
||||
#include <osg/Vec3d>
|
||||
@ -31,12 +32,12 @@ class OSG_EXPORT BoundingBox
|
||||
{
|
||||
public:
|
||||
|
||||
#ifdef OSG_USE_DOUBLE_BOUNDINGBOX
|
||||
typedef Vec3d vec_type;
|
||||
typedef double value_type;
|
||||
#else
|
||||
#ifdef OSG_USE_FLOAT_BOUNDINGBOX
|
||||
typedef Vec3f vec_type;
|
||||
typedef float value_type;
|
||||
#else
|
||||
typedef Vec3d vec_type;
|
||||
typedef double value_type;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#ifndef OSG_BOUNDINGSPHERE
|
||||
#define OSG_BOUNDINGSPHERE 1
|
||||
|
||||
#include <osg/Config>
|
||||
#include <osg/Export>
|
||||
#include <osg/Vec3f>
|
||||
#include <osg/Vec3d>
|
||||
@ -32,12 +33,12 @@ class OSG_EXPORT BoundingSphere
|
||||
{
|
||||
public:
|
||||
|
||||
#ifdef OSG_USE_DOUBLE_BOUNDINGSPHERE
|
||||
typedef Vec3d vec_type;
|
||||
typedef double value_type;
|
||||
#else
|
||||
#ifdef OSG_USE_FLOAT_BOUNDINGSPHERE
|
||||
typedef Vec3f vec_type;
|
||||
typedef float value_type;
|
||||
#else
|
||||
typedef Vec3d vec_type;
|
||||
typedef double value_type;
|
||||
#endif
|
||||
|
||||
vec_type _center;
|
||||
|
@ -14,6 +14,7 @@
|
||||
#ifndef OSG_MATRIX
|
||||
#define OSG_MATRIX 1
|
||||
|
||||
#include <osg/Config>
|
||||
#include <osg/Matrixd>
|
||||
#include <osg/Matrixf>
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#ifndef OSG_PLANE
|
||||
#define OSG_PLANE 1
|
||||
|
||||
#include <osg/Config>
|
||||
#include <osg/Export>
|
||||
#include <osg/Vec3>
|
||||
#include <osg/Vec4>
|
||||
|
@ -23,6 +23,7 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/BoundingBox
|
||||
${HEADER_PATH}/BoundingSphere
|
||||
${HEADER_PATH}/BoundsChecking
|
||||
${HEADER_PATH}/buffered_value
|
||||
${HEADER_PATH}/BufferObject
|
||||
${HEADER_PATH}/Camera
|
||||
${HEADER_PATH}/CameraNode
|
||||
@ -36,53 +37,56 @@ 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
|
||||
${HEADER_PATH}/CopyOp
|
||||
${HEADER_PATH}/CullFace
|
||||
${HEADER_PATH}/CullingSet
|
||||
${HEADER_PATH}/CullSettings
|
||||
${HEADER_PATH}/CullStack
|
||||
${HEADER_PATH}/CullingSet
|
||||
${HEADER_PATH}/DeleteHandler
|
||||
${HEADER_PATH}/Depth
|
||||
${HEADER_PATH}/DisplaySettings
|
||||
${HEADER_PATH}/DrawPixels
|
||||
${HEADER_PATH}/Drawable
|
||||
${HEADER_PATH}/DrawPixels
|
||||
${HEADER_PATH}/Endian
|
||||
${HEADER_PATH}/Export
|
||||
${HEADER_PATH}/fast_back_stack
|
||||
${HEADER_PATH}/Fog
|
||||
${HEADER_PATH}/FragmentProgram
|
||||
${HEADER_PATH}/FrameBufferObject
|
||||
${HEADER_PATH}/FrameStamp
|
||||
${HEADER_PATH}/FrontFace
|
||||
${HEADER_PATH}/Geode
|
||||
${HEADER_PATH}/Geometry
|
||||
${HEADER_PATH}/GL
|
||||
${HEADER_PATH}/GL2Extensions
|
||||
${HEADER_PATH}/GLExtensions
|
||||
${HEADER_PATH}/GLObjects
|
||||
${HEADER_PATH}/GLU
|
||||
${HEADER_PATH}/Geode
|
||||
${HEADER_PATH}/Geometry
|
||||
${HEADER_PATH}/GraphicsContext
|
||||
${HEADER_PATH}/GraphicsThread
|
||||
${HEADER_PATH}/Group
|
||||
${HEADER_PATH}/Hint
|
||||
${HEADER_PATH}/Image
|
||||
${HEADER_PATH}/ImageStream
|
||||
${HEADER_PATH}/LOD
|
||||
${HEADER_PATH}/io_utils
|
||||
${HEADER_PATH}/Light
|
||||
${HEADER_PATH}/LightModel
|
||||
${HEADER_PATH}/LightSource
|
||||
${HEADER_PATH}/LineSegment
|
||||
${HEADER_PATH}/LineStipple
|
||||
${HEADER_PATH}/LineWidth
|
||||
${HEADER_PATH}/LOD
|
||||
${HEADER_PATH}/LogicOp
|
||||
${HEADER_PATH}/Material
|
||||
${HEADER_PATH}/Math
|
||||
${HEADER_PATH}/Matrix
|
||||
${HEADER_PATH}/MatrixTransform
|
||||
${HEADER_PATH}/Matrixd
|
||||
${HEADER_PATH}/Matrixf
|
||||
${HEADER_PATH}/MatrixTransform
|
||||
${HEADER_PATH}/Multisample
|
||||
${HEADER_PATH}/Node
|
||||
${HEADER_PATH}/NodeCallback
|
||||
@ -90,6 +94,7 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/NodeVisitor
|
||||
${HEADER_PATH}/Notify
|
||||
${HEADER_PATH}/Object
|
||||
${HEADER_PATH}/observer_ptr
|
||||
${HEADER_PATH}/OccluderNode
|
||||
${HEADER_PATH}/OcclusionQueryNode
|
||||
${HEADER_PATH}/OperationThread
|
||||
@ -108,6 +113,7 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/ProxyNode
|
||||
${HEADER_PATH}/Quat
|
||||
${HEADER_PATH}/Referenced
|
||||
${HEADER_PATH}/ref_ptr
|
||||
${HEADER_PATH}/RenderInfo
|
||||
${HEADER_PATH}/Scissor
|
||||
${HEADER_PATH}/Sequence
|
||||
@ -138,10 +144,10 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/TextureCubeMap
|
||||
${HEADER_PATH}/TextureRectangle
|
||||
${HEADER_PATH}/Timer
|
||||
${HEADER_PATH}/TransferFunction
|
||||
${HEADER_PATH}/Transform
|
||||
${HEADER_PATH}/TriangleFunctor
|
||||
${HEADER_PATH}/TriangleIndexFunctor
|
||||
${HEADER_PATH}/TransferFunction
|
||||
${HEADER_PATH}/Uniform
|
||||
${HEADER_PATH}/Vec2
|
||||
${HEADER_PATH}/Vec2b
|
||||
@ -163,11 +169,6 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/VertexProgram
|
||||
${HEADER_PATH}/View
|
||||
${HEADER_PATH}/Viewport
|
||||
${HEADER_PATH}/buffered_value
|
||||
${HEADER_PATH}/fast_back_stack
|
||||
${HEADER_PATH}/io_utils
|
||||
${HEADER_PATH}/observer_ptr
|
||||
${HEADER_PATH}/ref_ptr
|
||||
)
|
||||
|
||||
ADD_LIBRARY(${LIB_NAME}
|
||||
|
10
src/osg/Config.in
Normal file
10
src/osg/Config.in
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef OSG_CONFIG
|
||||
#define OSG_CONFIG 1
|
||||
|
||||
#cmakedefine OSG_USE_FLOAT_MATRIX
|
||||
#cmakedefine OSG_USE_FLOAT_PLANE
|
||||
#cmakedefine OSG_USE_FLOAT_BOUNDINGSPHERE
|
||||
#cmakedefine OSG_USE_FLOAT_BOUNDINGBOX
|
||||
#cmakedefine OSG_ENFORCE_THREADSAFE
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user