From Eric Wing and others, first cut of CMake build support
This commit is contained in:
parent
b086f7195f
commit
f50ed9667a
185
CMakeLists.txt
Normal file
185
CMakeLists.txt
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
PROJECT(OpenSceneGraph)
|
||||||
|
|
||||||
|
# We have some custom .cmake scripts not in the official distribution.
|
||||||
|
# Maybe this can be used override existing behavior if needed?
|
||||||
|
SET(CMAKE_MODULE_PATH "${OpenSceneGraph_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
|
||||||
|
|
||||||
|
# Mainly for Windows as a convenience. This will find a directory in parallel with the
|
||||||
|
# OSG source that contains 3rd party headers and libraries.
|
||||||
|
# Use of relative paths in CMake is ill-advised, but don't know of any alternatives in this case
|
||||||
|
SET(CMAKE_INCLUDE_PATH "${OpenSceneGraph_SOURCE_DIR}/../3rdParty/include;${CMAKE_INCLUDE_PATH}")
|
||||||
|
SET(CMAKE_LIBRARY_PATH "${OpenSceneGraph_SOURCE_DIR}/../3rdParty/lib;${CMAKE_LIBRARY_PATH}")
|
||||||
|
IF(USING_OSG_OP_OT_TRIPLE_SET)
|
||||||
|
SET(CMAKE_INCLUDE_PATH "${OpenSceneGraph_SOURCE_DIR}/../../3rdParty/include;${CMAKE_INCLUDE_PATH}")
|
||||||
|
SET(CMAKE_LIBRARY_PATH "${OpenSceneGraph_SOURCE_DIR}/../../3rdParty/lib;${CMAKE_LIBRARY_PATH}")
|
||||||
|
ENDIF(USING_OSG_OP_OT_TRIPLE_SET)
|
||||||
|
|
||||||
|
|
||||||
|
# FIXME: The FindOpenThreads stuff below is not quite correct.
|
||||||
|
# The problem is that if we are building OpenSceneGraph by itself
|
||||||
|
# (not part of the triple-set OT/OP/OSG source), then we need to hunt
|
||||||
|
# down the OpenThreads library on the system.
|
||||||
|
# But if we are building as part of the triple-set, then we want to
|
||||||
|
# refer to the version in the triple set. But this gets harder because
|
||||||
|
# FIND_LIBRARY will fail to pick the triple set version in this case
|
||||||
|
# because the library is not yet built when running this CMake script.
|
||||||
|
#
|
||||||
|
# Maybe we need a global flag (set in the root CMakeLists.txt)
|
||||||
|
# that tells us which scenario we are doing.
|
||||||
|
# And in the triple set case, we skip this check.
|
||||||
|
|
||||||
|
IF(USING_OSG_OP_OT_TRIPLE_SET)
|
||||||
|
# MESSAGE("OSG: Using TripleSet, ${OpenThreads_SOURCE_DIR}.")
|
||||||
|
# So I think the fall-out is that all the OpenThreads variables
|
||||||
|
# that have been set are still in play. So the include paths are still
|
||||||
|
# visible, and the library is still set.
|
||||||
|
# To keep the same code paths
|
||||||
|
SET(OPENTHREADS_LIBRARY OpenThreads)
|
||||||
|
SET(OPENTHREADS_INCLUDE_DIR ${OpenThreads_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
# MESSAGE("Lib: ${OPENTHREADS_LIBRARY}")
|
||||||
|
|
||||||
|
|
||||||
|
ELSE(USING_OSG_OP_OT_TRIPLE_SET)
|
||||||
|
# MESSAGE("OSG: Not using Triple Set")
|
||||||
|
FIND_PACKAGE(OpenThreads REQUIRED)
|
||||||
|
|
||||||
|
ENDIF(USING_OSG_OP_OT_TRIPLE_SET)# Find OpenGL
|
||||||
|
FIND_PACKAGE(OpenGL)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_LIBRARY(CARBON_LIBRARY Carbon)
|
||||||
|
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
# Not sure what this will do on Cygwin and Msys
|
||||||
|
# Also, remember OS X X11 is a user installed option so it may not exist.
|
||||||
|
FIND_PACKAGE(X11)
|
||||||
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
# Make the headers visible to everything
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${OpenSceneGraph_SOURCE_DIR}/include
|
||||||
|
${OPENTHREADS_INCLUDE_DIR}
|
||||||
|
${OPENGL_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Common global definitions
|
||||||
|
#ADD_DEFINITIONS(-D)
|
||||||
|
# Platform specific definitions
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
# Both Cygwin and Msys need -DNOMINMAX ???
|
||||||
|
IF(UNIX)
|
||||||
|
ADD_DEFINITIONS(-DNOMINMAX)
|
||||||
|
ENDIF(UNIX)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# 3rd Party Dependency Stuff
|
||||||
|
|
||||||
|
# Common to all platforms:
|
||||||
|
FIND_PACKAGE(FreeType)
|
||||||
|
|
||||||
|
|
||||||
|
# Platform specific:
|
||||||
|
# (We can approach this one of two ways. We can try to FIND everything
|
||||||
|
# and simply check if we found the packages before actually building
|
||||||
|
# or we can hardcode the cases. The advantage of the former is that
|
||||||
|
# packages that are installed on platforms that don't require them
|
||||||
|
# will still get built (presuming no compatibility issues). But this
|
||||||
|
# also means modules that are redundant may get built. For example,
|
||||||
|
# OS X doesn't need GIF, JPEG, PNG, TIFF, etc because it uses QuickTime.
|
||||||
|
# Also, it will clutter the CMake menu with "NOT_FOUND".
|
||||||
|
# The downside to the latter is that it is harder to build those
|
||||||
|
# potentially redundant modules.)
|
||||||
|
|
||||||
|
# Image readers/writers depend on 3rd party libraries except for OS X which
|
||||||
|
# can use Quicktime.
|
||||||
|
IF(NOT APPLE)
|
||||||
|
FIND_PACKAGE(GIFLIB)
|
||||||
|
FIND_PACKAGE(JPEG)
|
||||||
|
FIND_PACKAGE(PNG)
|
||||||
|
FIND_PACKAGE(TIFF)
|
||||||
|
|
||||||
|
# QuickTime is required for OS X, but optional for Windows.
|
||||||
|
IF(WIN32)
|
||||||
|
FIND_PACKAGE(QuickTime)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
ELSE(NOT APPLE)
|
||||||
|
FIND_PACKAGE(QuickTime)
|
||||||
|
ENDIF(NOT APPLE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Installation stuff
|
||||||
|
|
||||||
|
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||||
|
#SET(INSTALL_BINDIR OpenSceneGraph/bin)
|
||||||
|
#SET(INSTALL_INCDIR OpenSceneGraph/include)
|
||||||
|
#SET(INSTALL_LIBDIR OpenSceneGraph/lib)
|
||||||
|
#SET(INSTALL_DOCDIR OpenSceneGraph/doc)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# User Options
|
||||||
|
|
||||||
|
# Dynamic vs Static Linking
|
||||||
|
OPTION(DYNAMIC_OPENSCENEGRAPH "Set to ON to build OpenSceneGraph for dynamic linking. Use OFF for static." ON)
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
SET(OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC "SHARED")
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
SET(OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC "STATIC")
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
# OSG Core
|
||||||
|
ADD_SUBDIRECTORY(src)
|
||||||
|
|
||||||
|
# OSG Applications
|
||||||
|
OPTION(BUILD_OSG_APPLICATIONS "Enable to build OSG Applications (e.g. osgviewer)" OFF)
|
||||||
|
IF (BUILD_OSG_APPLICATIONS)
|
||||||
|
ADD_SUBDIRECTORY(applications)
|
||||||
|
ENDIF(BUILD_OSG_APPLICATIONS)
|
||||||
|
|
||||||
|
# OSG Examples
|
||||||
|
OPTION(BUILD_OSG_EXAMPLES "Enable to build OSG Examples" OFF)
|
||||||
|
IF (BUILD_OSG_EXAMPLES)
|
||||||
|
ADD_SUBDIRECTORY(examples)
|
||||||
|
ENDIF(BUILD_OSG_EXAMPLES)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# For Doxygen
|
||||||
|
#FIXME: I haven't figured out what to do with OSG's multiple doxyfiles
|
||||||
|
# and footer.
|
||||||
|
INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
|
||||||
|
|
||||||
|
# To build the documention, you will have to enable it
|
||||||
|
# and then do the equivalent of "make DoxygenDoc".
|
||||||
|
IF(BUILD_DOCUMENTATION)
|
||||||
|
IF(DOT)
|
||||||
|
SET(HAVE_DOT YES)
|
||||||
|
ELSE(DOT)
|
||||||
|
SET(HAVE_DOT NO)
|
||||||
|
ENDIF(DOT)
|
||||||
|
# This processes our Doxyfile.in and substitutes paths to generate
|
||||||
|
# a final Doxyfile
|
||||||
|
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/Doxyfiles/doxyfile.cmake
|
||||||
|
${PROJECT_BINARY_DIR}/doc/doxyfile
|
||||||
|
)
|
||||||
|
# This creates a new target to build documentation.
|
||||||
|
# It runs ${DOXYGEN} which is the full path and executable to
|
||||||
|
# Doxygen on your system, set by the FindDoxygen.cmake module
|
||||||
|
# (called by FindDocumentation.cmake).
|
||||||
|
# It runs the final generated Doxyfile against it.
|
||||||
|
# The DOT_PATH is substituted into the Doxyfile.
|
||||||
|
ADD_CUSTOM_TARGET(DoxygenDoc ${DOXYGEN}
|
||||||
|
${PROJECT_BINARY_DIR}/docs/doxyfile
|
||||||
|
)
|
||||||
|
ENDIF(BUILD_DOCUMENTATION)
|
||||||
|
|
76
CMakeModules/FindFreeType.cmake
Normal file
76
CMakeModules/FindFreeType.cmake
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# - Locate FreeType library
|
||||||
|
# This module defines
|
||||||
|
# FREETYPE_LIBRARY, the library to link against
|
||||||
|
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
|
||||||
|
# FREETYPE_INCLUDE_DIRS, where to find headers.
|
||||||
|
# This is the concatenation of the paths:
|
||||||
|
# FREETYPE_INCLUDE_DIR_ft2build
|
||||||
|
# FREETYPE_INCLUDE_DIR_freetype2
|
||||||
|
#
|
||||||
|
# $FREETYPE_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$FREETYPE_DIR
|
||||||
|
# used in building FREETYPE.
|
||||||
|
# Created by Eric Wing.
|
||||||
|
|
||||||
|
# Ugh, FreeType seems to use some #include trickery which
|
||||||
|
# makes this harder than it should be. It looks like they
|
||||||
|
# put ft2build.h in a common/easier-to-find location which
|
||||||
|
# then contains a #include to a more specific header in a
|
||||||
|
# more specific location (#include <freetype/config/ftheader.h>).
|
||||||
|
# Then from there, they need to set a bunch of #define's
|
||||||
|
# so you can do something like:
|
||||||
|
# #include FT_FREETYPE_H
|
||||||
|
# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
|
||||||
|
# wants explicit full paths and this trickery doesn't work too well.
|
||||||
|
# I'm going to attempt to cut out the middleman and hope
|
||||||
|
# everything still works.
|
||||||
|
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
||||||
|
$ENV{FREETYPE_DIR}
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/usr/local/X11R6
|
||||||
|
/usr/X11R6/include
|
||||||
|
/sw/include
|
||||||
|
/opt/local/include
|
||||||
|
/opt/csw/include
|
||||||
|
/opt/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
||||||
|
$ENV{FREETYPE_DIR}/include/freetype2
|
||||||
|
/usr/local/include/freetype2
|
||||||
|
/usr/include/freetype2
|
||||||
|
/usr/local/X11R6/include/freetype2
|
||||||
|
/usr/X11R6/include/freetype2
|
||||||
|
/sw/include/freetype2
|
||||||
|
/opt/local/include/freetype2
|
||||||
|
/opt/csw/include/freetype2
|
||||||
|
/opt/include/freetype2
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(FREETYPE_LIBRARY
|
||||||
|
NAMES freetype libfreetype freetype219
|
||||||
|
PATHS
|
||||||
|
$ENV{FREETYPE_DIR}/lib
|
||||||
|
$ENV{FREETYPE_DIR}/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||||
|
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
|
||||||
|
|
||||||
|
SET(FREETYPE_FOUND "NO")
|
||||||
|
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||||
|
SET(FREETYPE_FOUND "YES")
|
||||||
|
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
|
54
CMakeModules/FindGIFLIB.cmake
Normal file
54
CMakeModules/FindGIFLIB.cmake
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Locate gdal
|
||||||
|
# This module defines
|
||||||
|
# GIFLIB_LIBRARY
|
||||||
|
# GIFLIB_FOUND, if false, do not try to link to gdal
|
||||||
|
# GIFLIB_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $GIFLIB_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$GIFLIB_DIR
|
||||||
|
# used in building gdal.
|
||||||
|
#
|
||||||
|
# Created by Eric Wing.
|
||||||
|
|
||||||
|
FIND_PATH(GIFLIB_INCLUDE_DIR gif_lib.h
|
||||||
|
$ENV{GIFLIB_DIR}/include
|
||||||
|
$ENV{GIFLIB_DIR}
|
||||||
|
$ENV{OSGDIR}/include
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(GIFLIB_LIBRARY
|
||||||
|
NAMES gif ungif libgif libungif
|
||||||
|
PATHS
|
||||||
|
$ENV{GIFLIB_DIR}/lib
|
||||||
|
$ENV{GIFLIB_DIR}
|
||||||
|
$ENV{OSGDIR}/lib
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/lib
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(GIFLIB_FOUND "NO")
|
||||||
|
IF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR)
|
||||||
|
SET(GIFLIB_FOUND "YES")
|
||||||
|
ENDIF(GIFLIB_LIBRARY AND GIFLIB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
60
CMakeModules/FindOpenThreads.cmake
Normal file
60
CMakeModules/FindOpenThreads.cmake
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# OpenThreads is a C++ based threading library. Its largest userbase
|
||||||
|
# seems to OpenSceneGraph so you might notice I accept OSGDIR as an
|
||||||
|
# environment path.
|
||||||
|
# I consider this part of the Findosg* suite used to find OpenSceneGraph
|
||||||
|
# components.
|
||||||
|
# Each component is separate and you must opt in to each module.
|
||||||
|
#
|
||||||
|
# Locate OpenThreads
|
||||||
|
# This module defines
|
||||||
|
# OPENTHREADS_LIBRARY
|
||||||
|
# OPENTHREADS_FOUND, if false, do not try to link to OpenThreads
|
||||||
|
# OPENTHREADS_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $OPENTHREADS_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$OPENTHREADS_DIR
|
||||||
|
# used in building osg.
|
||||||
|
#
|
||||||
|
# Created by Eric Wing.
|
||||||
|
|
||||||
|
# Header files are presumed to be included like
|
||||||
|
# #include <OpenThreads/Thread>
|
||||||
|
|
||||||
|
# Try the user's environment request before anything else.
|
||||||
|
FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
|
||||||
|
$ENV{OPENTHREADS_DIR}/include
|
||||||
|
$ENV{OSG_DIR}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
FIND_LIBRARY(OPENTHREADS_LIBRARY
|
||||||
|
NAMES OpenThreads OpenThreadsWin32
|
||||||
|
PATHS
|
||||||
|
$ENV{OPENTHREADS_DIR}/lib
|
||||||
|
$ENV{OSG_DIR}/lib
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(OPENTHREADS_FOUND "NO")
|
||||||
|
IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
|
||||||
|
SET(OPENTHREADS_FOUND "YES")
|
||||||
|
ENDIF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
|
||||||
|
|
||||||
|
|
32
CMakeModules/FindQuickTime.cmake
Normal file
32
CMakeModules/FindQuickTime.cmake
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Locate QuickTime
|
||||||
|
# This module defines
|
||||||
|
# QUICKTIME_LIBRARY
|
||||||
|
# QUICKTIME_FOUND, if false, do not try to link to gdal
|
||||||
|
# QUICKTIME_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $QUICKTIME_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$QUICKTIME_DIR
|
||||||
|
# used in building gdal.
|
||||||
|
#
|
||||||
|
# Created by Eric Wing.
|
||||||
|
|
||||||
|
# QuickTime on OS X looks different than QuickTime for Windows,
|
||||||
|
# so I am going to case the two.
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
|
||||||
|
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
||||||
|
ELSE(APPLE)
|
||||||
|
FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
|
||||||
|
$ENV{QUICKTIME_DIR}/include
|
||||||
|
$ENV{QUICKTIME_DIR}
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
SET(QUICKTIME_FOUND "NO")
|
||||||
|
IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
|
||||||
|
SET(QUICKTIME_FOUND "YES")
|
||||||
|
ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
26
src/CMakeLists.txt
Normal file
26
src/CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
SUBDIRS(
|
||||||
|
osg
|
||||||
|
osgDB
|
||||||
|
osgUtil
|
||||||
|
osgText
|
||||||
|
osgIntrospection
|
||||||
|
osgGA
|
||||||
|
osgManipulator
|
||||||
|
osgSim
|
||||||
|
osgFX
|
||||||
|
osgParticle
|
||||||
|
osgShadow
|
||||||
|
osgViewer
|
||||||
|
osgTerrain
|
||||||
|
)
|
||||||
|
|
||||||
|
OPTION(BUILD_OSG_PLUGINS "Enable to build OSG Plugins" OFF)
|
||||||
|
IF (BUILD_OSG_PLUGINS)
|
||||||
|
ADD_SUBDIRECTORY(osgPlugins)
|
||||||
|
ENDIF(BUILD_OSG_PLUGINS)
|
||||||
|
|
||||||
|
OPTION(BUILD_OSG_WRAPPERS "Enable to build OSG Wrapper" OFF)
|
||||||
|
IF (BUILD_OSG_WRAPPERS)
|
||||||
|
ADD_SUBDIRECTORY(osgWrappers)
|
||||||
|
ENDIF(BUILD_OSG_WRAPPERS)
|
297
src/osg/CMakeLists.txt
Normal file
297
src/osg/CMakeLists.txt
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osg)
|
||||||
|
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/AlphaFunc
|
||||||
|
${HEADER_PATH}/AnimationPath
|
||||||
|
${HEADER_PATH}/ApplicationUsage
|
||||||
|
${HEADER_PATH}/ArgumentParser
|
||||||
|
${HEADER_PATH}/Array
|
||||||
|
${HEADER_PATH}/AutoTransform
|
||||||
|
${HEADER_PATH}/Billboard
|
||||||
|
${HEADER_PATH}/BlendColor
|
||||||
|
${HEADER_PATH}/BlendEquation
|
||||||
|
${HEADER_PATH}/BlendFunc
|
||||||
|
${HEADER_PATH}/BoundingBox
|
||||||
|
${HEADER_PATH}/BoundingSphere
|
||||||
|
${HEADER_PATH}/BoundsChecking
|
||||||
|
${HEADER_PATH}/BufferObject
|
||||||
|
${HEADER_PATH}/Camera
|
||||||
|
${HEADER_PATH}/CameraNode
|
||||||
|
${HEADER_PATH}/CameraView
|
||||||
|
${HEADER_PATH}/ClampColor
|
||||||
|
${HEADER_PATH}/ClearNode
|
||||||
|
${HEADER_PATH}/ClipNode
|
||||||
|
${HEADER_PATH}/ClipPlane
|
||||||
|
${HEADER_PATH}/ClusterCullingCallback
|
||||||
|
${HEADER_PATH}/CollectOccludersVisitor
|
||||||
|
${HEADER_PATH}/ColorMask
|
||||||
|
${HEADER_PATH}/ColorMatrix
|
||||||
|
${HEADER_PATH}/ConvexPlanarOccluder
|
||||||
|
${HEADER_PATH}/ConvexPlanarPolygon
|
||||||
|
${HEADER_PATH}/CoordinateSystemNode
|
||||||
|
${HEADER_PATH}/CopyOp
|
||||||
|
${HEADER_PATH}/CullFace
|
||||||
|
${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}/Endian
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/Fog
|
||||||
|
${HEADER_PATH}/FragmentProgram
|
||||||
|
${HEADER_PATH}/FrameBufferObject
|
||||||
|
${HEADER_PATH}/FrameStamp
|
||||||
|
${HEADER_PATH}/FrontFace
|
||||||
|
${HEADER_PATH}/GL
|
||||||
|
${HEADER_PATH}/GL2Extensions
|
||||||
|
${HEADER_PATH}/GLExtensions
|
||||||
|
${HEADER_PATH}/GLU
|
||||||
|
${HEADER_PATH}/Geode
|
||||||
|
${HEADER_PATH}/Geometry
|
||||||
|
${HEADER_PATH}/GraphicsContext
|
||||||
|
${HEADER_PATH}/GraphicsThread
|
||||||
|
${HEADER_PATH}/Group
|
||||||
|
${HEADER_PATH}/Image
|
||||||
|
${HEADER_PATH}/ImageStream
|
||||||
|
${HEADER_PATH}/LOD
|
||||||
|
${HEADER_PATH}/Light
|
||||||
|
${HEADER_PATH}/LightModel
|
||||||
|
${HEADER_PATH}/LightSource
|
||||||
|
${HEADER_PATH}/LineSegment
|
||||||
|
${HEADER_PATH}/LineStipple
|
||||||
|
${HEADER_PATH}/LineWidth
|
||||||
|
${HEADER_PATH}/LogicOp
|
||||||
|
${HEADER_PATH}/Material
|
||||||
|
${HEADER_PATH}/Math
|
||||||
|
${HEADER_PATH}/Matrix
|
||||||
|
${HEADER_PATH}/MatrixTransform
|
||||||
|
${HEADER_PATH}/Matrixd
|
||||||
|
${HEADER_PATH}/Matrixf
|
||||||
|
${HEADER_PATH}/Multisample
|
||||||
|
${HEADER_PATH}/Node
|
||||||
|
${HEADER_PATH}/NodeCallback
|
||||||
|
${HEADER_PATH}/NodeTrackerCallback
|
||||||
|
${HEADER_PATH}/NodeVisitor
|
||||||
|
${HEADER_PATH}/Notify
|
||||||
|
${HEADER_PATH}/Object
|
||||||
|
${HEADER_PATH}/OccluderNode
|
||||||
|
${HEADER_PATH}/PagedLOD
|
||||||
|
${HEADER_PATH}/Plane
|
||||||
|
${HEADER_PATH}/Point
|
||||||
|
${HEADER_PATH}/PointSprite
|
||||||
|
${HEADER_PATH}/PolygonMode
|
||||||
|
${HEADER_PATH}/PolygonOffset
|
||||||
|
${HEADER_PATH}/PolygonStipple
|
||||||
|
${HEADER_PATH}/Polytope
|
||||||
|
${HEADER_PATH}/PositionAttitudeTransform
|
||||||
|
${HEADER_PATH}/PrimitiveSet
|
||||||
|
${HEADER_PATH}/Program
|
||||||
|
${HEADER_PATH}/Projection
|
||||||
|
${HEADER_PATH}/ProxyNode
|
||||||
|
${HEADER_PATH}/Quat
|
||||||
|
${HEADER_PATH}/Referenced
|
||||||
|
${HEADER_PATH}/RenderInfo
|
||||||
|
${HEADER_PATH}/Scissor
|
||||||
|
${HEADER_PATH}/Sequence
|
||||||
|
${HEADER_PATH}/ShadeModel
|
||||||
|
${HEADER_PATH}/Shader
|
||||||
|
${HEADER_PATH}/ShadowVolumeOccluder
|
||||||
|
${HEADER_PATH}/Shape
|
||||||
|
${HEADER_PATH}/ShapeDrawable
|
||||||
|
${HEADER_PATH}/State
|
||||||
|
${HEADER_PATH}/StateAttribute
|
||||||
|
${HEADER_PATH}/StateSet
|
||||||
|
${HEADER_PATH}/Stats
|
||||||
|
${HEADER_PATH}/Stencil
|
||||||
|
${HEADER_PATH}/Switch
|
||||||
|
${HEADER_PATH}/TexEnv
|
||||||
|
${HEADER_PATH}/TexEnvCombine
|
||||||
|
${HEADER_PATH}/TexEnvFilter
|
||||||
|
${HEADER_PATH}/TexGen
|
||||||
|
${HEADER_PATH}/TexGenNode
|
||||||
|
${HEADER_PATH}/TexMat
|
||||||
|
${HEADER_PATH}/Texture
|
||||||
|
${HEADER_PATH}/Texture1D
|
||||||
|
${HEADER_PATH}/Texture2D
|
||||||
|
${HEADER_PATH}/Texture3D
|
||||||
|
${HEADER_PATH}/TextureCubeMap
|
||||||
|
${HEADER_PATH}/TextureRectangle
|
||||||
|
${HEADER_PATH}/Timer
|
||||||
|
${HEADER_PATH}/Transform
|
||||||
|
${HEADER_PATH}/TriangleFunctor
|
||||||
|
${HEADER_PATH}/TriangleIndexFunctor
|
||||||
|
${HEADER_PATH}/Uniform
|
||||||
|
${HEADER_PATH}/Vec2
|
||||||
|
${HEADER_PATH}/Vec2b
|
||||||
|
${HEADER_PATH}/Vec2d
|
||||||
|
${HEADER_PATH}/Vec2f
|
||||||
|
${HEADER_PATH}/Vec2s
|
||||||
|
${HEADER_PATH}/Vec3
|
||||||
|
${HEADER_PATH}/Vec3b
|
||||||
|
${HEADER_PATH}/Vec3d
|
||||||
|
${HEADER_PATH}/Vec3f
|
||||||
|
${HEADER_PATH}/Vec3s
|
||||||
|
${HEADER_PATH}/Vec4
|
||||||
|
${HEADER_PATH}/Vec4b
|
||||||
|
${HEADER_PATH}/Vec4d
|
||||||
|
${HEADER_PATH}/Vec4f
|
||||||
|
${HEADER_PATH}/Vec4s
|
||||||
|
${HEADER_PATH}/Vec4ub
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
${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}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
AlphaFunc.cpp
|
||||||
|
AnimationPath.cpp
|
||||||
|
ApplicationUsage.cpp
|
||||||
|
ArgumentParser.cpp
|
||||||
|
Array.cpp
|
||||||
|
AutoTransform.cpp
|
||||||
|
Billboard.cpp
|
||||||
|
BlendColor.cpp
|
||||||
|
BlendEquation.cpp
|
||||||
|
BlendFunc.cpp
|
||||||
|
BoundingBox.cpp
|
||||||
|
BoundingSphere.cpp
|
||||||
|
BufferObject.cpp
|
||||||
|
Camera.cpp
|
||||||
|
CameraView.cpp
|
||||||
|
ClampColor.cpp
|
||||||
|
ClearNode.cpp
|
||||||
|
ClipNode.cpp
|
||||||
|
ClipPlane.cpp
|
||||||
|
ClusterCullingCallback.cpp
|
||||||
|
CollectOccludersVisitor.cpp
|
||||||
|
ColorMask.cpp
|
||||||
|
ColorMatrix.cpp
|
||||||
|
ConvexPlanarOccluder.cpp
|
||||||
|
ConvexPlanarPolygon.cpp
|
||||||
|
CoordinateSystemNode.cpp
|
||||||
|
CopyOp.cpp
|
||||||
|
CullFace.cpp
|
||||||
|
CullSettings.cpp
|
||||||
|
CullStack.cpp
|
||||||
|
CullingSet.cpp
|
||||||
|
DeleteHandler.cpp
|
||||||
|
Depth.cpp
|
||||||
|
DisplaySettings.cpp
|
||||||
|
DrawPixels.cpp
|
||||||
|
Drawable.cpp
|
||||||
|
Fog.cpp
|
||||||
|
FragmentProgram.cpp
|
||||||
|
FrameBufferObject.cpp
|
||||||
|
FrameStamp.cpp
|
||||||
|
FrontFace.cpp
|
||||||
|
GLExtensions.cpp
|
||||||
|
Geode.cpp
|
||||||
|
Geometry.cpp
|
||||||
|
GraphicsContext.cpp
|
||||||
|
GraphicsThread.cpp
|
||||||
|
Group.cpp
|
||||||
|
Image.cpp
|
||||||
|
ImageStream.cpp
|
||||||
|
LOD.cpp
|
||||||
|
Light.cpp
|
||||||
|
LightModel.cpp
|
||||||
|
LightSource.cpp
|
||||||
|
LineSegment.cpp
|
||||||
|
LineStipple.cpp
|
||||||
|
LineWidth.cpp
|
||||||
|
LogicOp.cpp
|
||||||
|
Material.cpp
|
||||||
|
MatrixDecomposition.cpp
|
||||||
|
MatrixTransform.cpp
|
||||||
|
# We don't build this one
|
||||||
|
# Matrix_implementation.cpp
|
||||||
|
Matrixd.cpp
|
||||||
|
Matrixf.cpp
|
||||||
|
Multisample.cpp
|
||||||
|
Node.cpp
|
||||||
|
NodeCallback.cpp
|
||||||
|
NodeTrackerCallback.cpp
|
||||||
|
NodeVisitor.cpp
|
||||||
|
Notify.cpp
|
||||||
|
Object.cpp
|
||||||
|
OccluderNode.cpp
|
||||||
|
PagedLOD.cpp
|
||||||
|
Point.cpp
|
||||||
|
PointSprite.cpp
|
||||||
|
PolygonMode.cpp
|
||||||
|
PolygonOffset.cpp
|
||||||
|
PolygonStipple.cpp
|
||||||
|
PositionAttitudeTransform.cpp
|
||||||
|
PrimitiveSet.cpp
|
||||||
|
Program.cpp
|
||||||
|
Projection.cpp
|
||||||
|
ProxyNode.cpp
|
||||||
|
Quat.cpp
|
||||||
|
Referenced.cpp
|
||||||
|
Scissor.cpp
|
||||||
|
Sequence.cpp
|
||||||
|
ShadeModel.cpp
|
||||||
|
Shader.cpp
|
||||||
|
ShadowVolumeOccluder.cpp
|
||||||
|
Shape.cpp
|
||||||
|
ShapeDrawable.cpp
|
||||||
|
State.cpp
|
||||||
|
StateAttribute.cpp
|
||||||
|
StateSet.cpp
|
||||||
|
Stats.cpp
|
||||||
|
Stencil.cpp
|
||||||
|
StencilTwoSided.cpp
|
||||||
|
Switch.cpp
|
||||||
|
TexEnv.cpp
|
||||||
|
TexEnvCombine.cpp
|
||||||
|
TexEnvFilter.cpp
|
||||||
|
TexGen.cpp
|
||||||
|
TexGenNode.cpp
|
||||||
|
TexMat.cpp
|
||||||
|
Texture.cpp
|
||||||
|
Texture1D.cpp
|
||||||
|
Texture2D.cpp
|
||||||
|
Texture3D.cpp
|
||||||
|
TextureCubeMap.cpp
|
||||||
|
TextureRectangle.cpp
|
||||||
|
Timer.cpp
|
||||||
|
Transform.cpp
|
||||||
|
Uniform.cpp
|
||||||
|
Version.cpp
|
||||||
|
VertexProgram.cpp
|
||||||
|
View.cpp
|
||||||
|
Viewport.cpp
|
||||||
|
dxtctool.cpp
|
||||||
|
dxtctool.h
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# This file should not be built, but should be in the project file
|
||||||
|
LIST(APPEND LIB_PUBLIC_HEADERS Matrix_implementation.cpp)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
69
src/osgDB/CMakeLists.txt
Normal file
69
src/osgDB/CMakeLists.txt
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGDB_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgDB)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/Archive
|
||||||
|
${HEADER_PATH}/DatabasePager
|
||||||
|
${HEADER_PATH}/DotOsgWrapper
|
||||||
|
${HEADER_PATH}/DynamicLibrary
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/Field
|
||||||
|
${HEADER_PATH}/FieldReader
|
||||||
|
${HEADER_PATH}/FieldReaderIterator
|
||||||
|
${HEADER_PATH}/FileNameUtils
|
||||||
|
${HEADER_PATH}/FileUtils
|
||||||
|
${HEADER_PATH}/ImageOptions
|
||||||
|
${HEADER_PATH}/Input
|
||||||
|
${HEADER_PATH}/Output
|
||||||
|
${HEADER_PATH}/ParameterOutput
|
||||||
|
${HEADER_PATH}/ReaderWriter
|
||||||
|
${HEADER_PATH}/ReadFile
|
||||||
|
${HEADER_PATH}/Registry
|
||||||
|
${HEADER_PATH}/SharedStateManager
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
${HEADER_PATH}/WriteFile
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
Archive.cpp
|
||||||
|
DatabasePager.cpp
|
||||||
|
DotOsgWrapper.cpp
|
||||||
|
DynamicLibrary.cpp
|
||||||
|
Field.cpp
|
||||||
|
FieldReader.cpp
|
||||||
|
FieldReaderIterator.cpp
|
||||||
|
FileNameUtils.cpp
|
||||||
|
FileUtils.cpp
|
||||||
|
ImageOptions.cpp
|
||||||
|
Input.cpp
|
||||||
|
Output.cpp
|
||||||
|
ReadFile.cpp
|
||||||
|
ReaderWriter.cpp
|
||||||
|
Registry.cpp
|
||||||
|
SharedStateManager.cpp
|
||||||
|
Version.cpp
|
||||||
|
WriteFile.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
# Needs CoreFoundation calls and a Carbon function
|
||||||
|
SET(OSGDB_PLATFORM_SPECIFIC_LIBRARIES ${CARBON_LIBRARY})
|
||||||
|
ENDIF(APPLE)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
${OSGDB_PLATFORM_SPECIFIC_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
48
src/osgFX/CMakeLists.txt
Normal file
48
src/osgFX/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGFX_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgFX)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/AnisotropicLighting
|
||||||
|
${HEADER_PATH}/BumpMapping
|
||||||
|
${HEADER_PATH}/Cartoon
|
||||||
|
${HEADER_PATH}/Effect
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/MultiTextureControl
|
||||||
|
${HEADER_PATH}/Registry
|
||||||
|
${HEADER_PATH}/Scribe
|
||||||
|
${HEADER_PATH}/SpecularHighlights
|
||||||
|
${HEADER_PATH}/Technique
|
||||||
|
${HEADER_PATH}/Validator
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
AnisotropicLighting.cpp
|
||||||
|
BumpMapping.cpp
|
||||||
|
Cartoon.cpp
|
||||||
|
Effect.cpp
|
||||||
|
MultiTextureControl.cpp
|
||||||
|
Registry.cpp
|
||||||
|
Scribe.cpp
|
||||||
|
SpecularHighlights.cpp
|
||||||
|
Technique.cpp
|
||||||
|
Validator.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgUtil
|
||||||
|
osgDB
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
58
src/osgGA/CMakeLists.txt
Normal file
58
src/osgGA/CMakeLists.txt
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGGA_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgGA)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/AnimationPathManipulator
|
||||||
|
${HEADER_PATH}/DriveManipulator
|
||||||
|
${HEADER_PATH}/EventQueue
|
||||||
|
${HEADER_PATH}/EventVisitor
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/FlightManipulator
|
||||||
|
${HEADER_PATH}/GUIActionAdapter
|
||||||
|
${HEADER_PATH}/GUIEventAdapter
|
||||||
|
${HEADER_PATH}/GUIEventHandler
|
||||||
|
${HEADER_PATH}/KeySwitchMatrixManipulator
|
||||||
|
${HEADER_PATH}/MatrixManipulator
|
||||||
|
${HEADER_PATH}/NodeTrackerManipulator
|
||||||
|
${HEADER_PATH}/StateSetManipulator
|
||||||
|
${HEADER_PATH}/TerrainManipulator
|
||||||
|
${HEADER_PATH}/TrackballManipulator
|
||||||
|
${HEADER_PATH}/UFOManipulator
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
AnimationPathManipulator.cpp
|
||||||
|
DriveManipulator.cpp
|
||||||
|
EventQueue.cpp
|
||||||
|
EventVisitor.cpp
|
||||||
|
FlightManipulator.cpp
|
||||||
|
GUIEventAdapter.cpp
|
||||||
|
GUIEventHandler.cpp
|
||||||
|
KeySwitchMatrixManipulator.cpp
|
||||||
|
MatrixManipulator.cpp
|
||||||
|
NodeTrackerManipulator.cpp
|
||||||
|
StateSetManipulator.cpp
|
||||||
|
TerrainManipulator.cpp
|
||||||
|
TrackballManipulator.cpp
|
||||||
|
UFOManipulator.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgUtil
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
62
src/osgIntrospection/CMakeLists.txt
Normal file
62
src/osgIntrospection/CMakeLists.txt
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGINTROSPECTION_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgIntrospection)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/Attributes
|
||||||
|
${HEADER_PATH}/Comparator
|
||||||
|
${HEADER_PATH}/ConstructorInfo
|
||||||
|
${HEADER_PATH}/Converter
|
||||||
|
${HEADER_PATH}/ConverterProxy
|
||||||
|
${HEADER_PATH}/CustomAttribute
|
||||||
|
${HEADER_PATH}/CustomAttributeProvider
|
||||||
|
${HEADER_PATH}/Exceptions
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/InstanceCreator
|
||||||
|
${HEADER_PATH}/MethodInfo
|
||||||
|
${HEADER_PATH}/ParameterInfo
|
||||||
|
${HEADER_PATH}/PropertyInfo
|
||||||
|
${HEADER_PATH}/PublicMemberAccessor
|
||||||
|
${HEADER_PATH}/ReaderWriter
|
||||||
|
${HEADER_PATH}/Reflection
|
||||||
|
${HEADER_PATH}/ReflectionMacros
|
||||||
|
${HEADER_PATH}/Reflector
|
||||||
|
${HEADER_PATH}/StaticMethodInfo
|
||||||
|
${HEADER_PATH}/Type
|
||||||
|
${HEADER_PATH}/TypeNameAliasProxy
|
||||||
|
${HEADER_PATH}/TypedConstructorInfo
|
||||||
|
${HEADER_PATH}/TypedMethodInfo
|
||||||
|
${HEADER_PATH}/Utility
|
||||||
|
${HEADER_PATH}/Value
|
||||||
|
${HEADER_PATH}/type_traits
|
||||||
|
${HEADER_PATH}/variant_cast
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
ConstructorInfo.cpp
|
||||||
|
CustomAttributeProvider.cpp
|
||||||
|
DefaultReflectors.cpp
|
||||||
|
MethodInfo.cpp
|
||||||
|
PropertyInfo.cpp
|
||||||
|
Reflection.cpp
|
||||||
|
Reflector.cpp
|
||||||
|
Type.cpp
|
||||||
|
Utility.cpp
|
||||||
|
Value.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
||||||
|
|
69
src/osgManipulator/CMakeLists.txt
Normal file
69
src/osgManipulator/CMakeLists.txt
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGMANIPULATOR_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgManipulator)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/AntiSquish
|
||||||
|
${HEADER_PATH}/Command
|
||||||
|
${HEADER_PATH}/CommandManager
|
||||||
|
${HEADER_PATH}/Constraint
|
||||||
|
${HEADER_PATH}/Dragger
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/Projector
|
||||||
|
${HEADER_PATH}/RotateCylinderDragger
|
||||||
|
${HEADER_PATH}/RotateSphereDragger
|
||||||
|
${HEADER_PATH}/Scale1DDragger
|
||||||
|
${HEADER_PATH}/Scale2DDragger
|
||||||
|
${HEADER_PATH}/ScaleAxisDragger
|
||||||
|
${HEADER_PATH}/Selection
|
||||||
|
${HEADER_PATH}/TabBoxDragger
|
||||||
|
${HEADER_PATH}/TabPlaneDragger
|
||||||
|
${HEADER_PATH}/TabPlaneTrackballDragger
|
||||||
|
${HEADER_PATH}/TrackballDragger
|
||||||
|
${HEADER_PATH}/Translate1DDragger
|
||||||
|
${HEADER_PATH}/Translate2DDragger
|
||||||
|
${HEADER_PATH}/TranslateAxisDragger
|
||||||
|
${HEADER_PATH}/TranslatePlaneDragger
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
AntiSquish.cpp
|
||||||
|
Command.cpp
|
||||||
|
CommandManager.cpp
|
||||||
|
Constraint.cpp
|
||||||
|
Dragger.cpp
|
||||||
|
GNUmakefile
|
||||||
|
Projector.cpp
|
||||||
|
RotateCylinderDragger.cpp
|
||||||
|
RotateSphereDragger.cpp
|
||||||
|
Scale1DDragger.cpp
|
||||||
|
Scale2DDragger.cpp
|
||||||
|
ScaleAxisDragger.cpp
|
||||||
|
Selection.cpp
|
||||||
|
TabBoxDragger.cpp
|
||||||
|
TabPlaneDragger.cpp
|
||||||
|
TabPlaneTrackballDragger.cpp
|
||||||
|
TrackballDragger.cpp
|
||||||
|
Translate1DDragger.cpp
|
||||||
|
Translate2DDragger.cpp
|
||||||
|
TranslateAxisDragger.cpp
|
||||||
|
TranslatePlaneDragger.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgGA
|
||||||
|
osgUtil
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
87
src/osgParticle/CMakeLists.txt
Normal file
87
src/osgParticle/CMakeLists.txt
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGPARTICLE_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgParticle)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/AccelOperator
|
||||||
|
${HEADER_PATH}/AngularAccelOperator
|
||||||
|
${HEADER_PATH}/BoxPlacer
|
||||||
|
${HEADER_PATH}/CenteredPlacer
|
||||||
|
${HEADER_PATH}/ConnectedParticleSystem
|
||||||
|
${HEADER_PATH}/ConstantRateCounter
|
||||||
|
${HEADER_PATH}/Counter
|
||||||
|
${HEADER_PATH}/Emitter
|
||||||
|
${HEADER_PATH}/ExplosionDebrisEffect
|
||||||
|
${HEADER_PATH}/ExplosionEffect
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/FireEffect
|
||||||
|
${HEADER_PATH}/FluidFrictionOperator
|
||||||
|
${HEADER_PATH}/FluidProgram
|
||||||
|
${HEADER_PATH}/ForceOperator
|
||||||
|
${HEADER_PATH}/Interpolator
|
||||||
|
${HEADER_PATH}/LinearInterpolator
|
||||||
|
${HEADER_PATH}/ModularEmitter
|
||||||
|
${HEADER_PATH}/ModularProgram
|
||||||
|
${HEADER_PATH}/MultiSegmentPlacer
|
||||||
|
${HEADER_PATH}/Operator
|
||||||
|
${HEADER_PATH}/Particle
|
||||||
|
${HEADER_PATH}/ParticleEffect
|
||||||
|
${HEADER_PATH}/ParticleProcessor
|
||||||
|
${HEADER_PATH}/ParticleSystem
|
||||||
|
${HEADER_PATH}/ParticleSystemUpdater
|
||||||
|
${HEADER_PATH}/Placer
|
||||||
|
${HEADER_PATH}/PointPlacer
|
||||||
|
${HEADER_PATH}/PrecipitationEffect
|
||||||
|
${HEADER_PATH}/Program
|
||||||
|
${HEADER_PATH}/RadialShooter
|
||||||
|
${HEADER_PATH}/RandomRateCounter
|
||||||
|
${HEADER_PATH}/range
|
||||||
|
${HEADER_PATH}/SectorPlacer
|
||||||
|
${HEADER_PATH}/SegmentPlacer
|
||||||
|
${HEADER_PATH}/Shooter
|
||||||
|
${HEADER_PATH}/SmokeEffect
|
||||||
|
${HEADER_PATH}/SmokeTrailEffect
|
||||||
|
${HEADER_PATH}/VariableRateCounter
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
ConnectedParticleSystem.cpp
|
||||||
|
Emitter.cpp
|
||||||
|
ExplosionDebrisEffect.cpp
|
||||||
|
ExplosionEffect.cpp
|
||||||
|
FireEffect.cpp
|
||||||
|
FluidFrictionOperator.cpp
|
||||||
|
FluidProgram.cpp
|
||||||
|
ModularEmitter.cpp
|
||||||
|
ModularProgram.cpp
|
||||||
|
MultiSegmentPlacer.cpp
|
||||||
|
Particle.cpp
|
||||||
|
ParticleEffect.cpp
|
||||||
|
ParticleProcessor.cpp
|
||||||
|
ParticleSystem.cpp
|
||||||
|
ParticleSystemUpdater.cpp
|
||||||
|
PrecipitationEffect.cpp
|
||||||
|
Program.cpp
|
||||||
|
SmokeEffect.cpp
|
||||||
|
SmokeTrailEffect.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgUtil
|
||||||
|
osgDB
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
55
src/osgPlugins/CMakeLists.txt
Normal file
55
src/osgPlugins/CMakeLists.txt
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
PROJECT(OSG_PLUGINS)
|
||||||
|
|
||||||
|
SUBDIRS(
|
||||||
|
3dc
|
||||||
|
ac3d
|
||||||
|
bmp
|
||||||
|
bsp
|
||||||
|
dds
|
||||||
|
directx
|
||||||
|
dw
|
||||||
|
dxf
|
||||||
|
ESRIShape
|
||||||
|
flt
|
||||||
|
freetype
|
||||||
|
geo
|
||||||
|
gif
|
||||||
|
hdr
|
||||||
|
# Inventor
|
||||||
|
ive
|
||||||
|
# jp2
|
||||||
|
jpeg
|
||||||
|
lib3ds
|
||||||
|
logo
|
||||||
|
lwo
|
||||||
|
lws
|
||||||
|
md2
|
||||||
|
net
|
||||||
|
normals
|
||||||
|
obj
|
||||||
|
OpenFlight
|
||||||
|
osg
|
||||||
|
osga
|
||||||
|
osgFX
|
||||||
|
osgParticle
|
||||||
|
osgSim
|
||||||
|
osgText
|
||||||
|
osgtgz
|
||||||
|
# pfb
|
||||||
|
pic
|
||||||
|
png
|
||||||
|
pnm
|
||||||
|
quicktime
|
||||||
|
rgb
|
||||||
|
rot
|
||||||
|
scale
|
||||||
|
stl
|
||||||
|
tga
|
||||||
|
tgz
|
||||||
|
tiff
|
||||||
|
trans
|
||||||
|
txp
|
||||||
|
# xine
|
||||||
|
zip
|
||||||
|
)
|
44
src/osgShadow/CMakeLists.txt
Normal file
44
src/osgShadow/CMakeLists.txt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGSHADOW_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgShadow)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/OccluderGeometry
|
||||||
|
${HEADER_PATH}/ParallelSplitShadowMap
|
||||||
|
${HEADER_PATH}/ShadowMap
|
||||||
|
${HEADER_PATH}/ShadowTechnique
|
||||||
|
${HEADER_PATH}/ShadowTexture
|
||||||
|
${HEADER_PATH}/ShadowVolume
|
||||||
|
${HEADER_PATH}/ShadowedScene
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
OccluderGeometry.cpp
|
||||||
|
ParallelSplitShadowMap.cpp
|
||||||
|
ShadowMap.cpp
|
||||||
|
ShadowTechnique.cpp
|
||||||
|
ShadowTexture.cpp
|
||||||
|
ShadowVolume.cpp
|
||||||
|
ShadowedScene.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgUtil
|
||||||
|
osgDB
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
68
src/osgSim/CMakeLists.txt
Normal file
68
src/osgSim/CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGSIM_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgSim)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/BlinkSequence
|
||||||
|
${HEADER_PATH}/ColorRange
|
||||||
|
${HEADER_PATH}/DOFTransform
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/GeographicLocation
|
||||||
|
${HEADER_PATH}/Impostor
|
||||||
|
${HEADER_PATH}/ImpostorSprite
|
||||||
|
${HEADER_PATH}/InsertImpostorsVisitor
|
||||||
|
${HEADER_PATH}/LightPoint
|
||||||
|
${HEADER_PATH}/LightPointNode
|
||||||
|
${HEADER_PATH}/LightPointSystem
|
||||||
|
${HEADER_PATH}/MultiSwitch
|
||||||
|
${HEADER_PATH}/OpenFlightOptimizer
|
||||||
|
${HEADER_PATH}/OverlayNode
|
||||||
|
${HEADER_PATH}/ScalarBar
|
||||||
|
${HEADER_PATH}/ScalarsToColors
|
||||||
|
${HEADER_PATH}/Sector
|
||||||
|
${HEADER_PATH}/SphereSegment
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
${HEADER_PATH}/VisibilityGroup
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
BlinkSequence.cpp
|
||||||
|
ColorRange.cpp
|
||||||
|
DOFTransform.cpp
|
||||||
|
Impostor.cpp
|
||||||
|
ImpostorSprite.cpp
|
||||||
|
InsertImpostorsVisitor.cpp
|
||||||
|
LightPoint.cpp
|
||||||
|
LightPointDrawable.cpp
|
||||||
|
LightPointDrawable.h
|
||||||
|
LightPointNode.cpp
|
||||||
|
LightPointSpriteDrawable.cpp
|
||||||
|
LightPointSpriteDrawable.h
|
||||||
|
MultiSwitch.cpp
|
||||||
|
OpenFlightOptimizer.cpp
|
||||||
|
OverlayNode.cpp
|
||||||
|
ScalarBar.cpp
|
||||||
|
ScalarsToColors.cpp
|
||||||
|
Sector.cpp
|
||||||
|
SphereSegment.cpp
|
||||||
|
Version.cpp
|
||||||
|
VisibilityGroup.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgText
|
||||||
|
osgUtil
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
47
src/osgTerrain/CMakeLists.txt
Normal file
47
src/osgTerrain/CMakeLists.txt
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# Only build if GDAL dependencies have been found.
|
||||||
|
IF(GDAL_FOUND)
|
||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGTERRAIN_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${GDAL_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgTerrain)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/DataSet
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/HeightFieldNode
|
||||||
|
${HEADER_PATH}/HeightFieldRenderer
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
DataSet.cpp
|
||||||
|
HeightFieldNode.cpp
|
||||||
|
HeightFieldRenderer.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osg
|
||||||
|
osgDB
|
||||||
|
osgUtil
|
||||||
|
osgFX
|
||||||
|
${GDAL_LIBRARY}
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
||||||
|
|
||||||
|
ENDIF(GDAL_FOUND)
|
||||||
|
|
37
src/osgText/CMakeLists.txt
Normal file
37
src/osgText/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGTEXT_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgText)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/Font
|
||||||
|
${HEADER_PATH}/String
|
||||||
|
${HEADER_PATH}/Text
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
DefaultFont.cpp
|
||||||
|
DefaultFont.h
|
||||||
|
Font.cpp
|
||||||
|
String.cpp
|
||||||
|
Text.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgDB
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
89
src/osgUtil/CMakeLists.txt
Normal file
89
src/osgUtil/CMakeLists.txt
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGUTIL_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgUtil)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/CubeMapGenerator
|
||||||
|
${HEADER_PATH}/CullVisitor
|
||||||
|
${HEADER_PATH}/DelaunayTriangulator
|
||||||
|
${HEADER_PATH}/DisplayRequirementsVisitor
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/GLObjectsVisitor
|
||||||
|
${HEADER_PATH}/HalfWayMapGenerator
|
||||||
|
${HEADER_PATH}/HighlightMapGenerator
|
||||||
|
${HEADER_PATH}/IntersectVisitor
|
||||||
|
${HEADER_PATH}/IntersectionVisitor
|
||||||
|
${HEADER_PATH}/LineSegmentIntersector
|
||||||
|
${HEADER_PATH}/Optimizer
|
||||||
|
${HEADER_PATH}/PlaneIntersector
|
||||||
|
${HEADER_PATH}/PolytopeIntersector
|
||||||
|
${HEADER_PATH}/PositionalStateContainer
|
||||||
|
${HEADER_PATH}/ReflectionMapGenerator
|
||||||
|
${HEADER_PATH}/RenderBin
|
||||||
|
${HEADER_PATH}/RenderLeaf
|
||||||
|
${HEADER_PATH}/RenderStage
|
||||||
|
${HEADER_PATH}/SceneView
|
||||||
|
${HEADER_PATH}/Simplifier
|
||||||
|
${HEADER_PATH}/SmoothingVisitor
|
||||||
|
${HEADER_PATH}/StateGraph
|
||||||
|
${HEADER_PATH}/Statistics
|
||||||
|
${HEADER_PATH}/TangentSpaceGenerator
|
||||||
|
${HEADER_PATH}/Tessellator
|
||||||
|
${HEADER_PATH}/TransformAttributeFunctor
|
||||||
|
${HEADER_PATH}/TransformCallback
|
||||||
|
${HEADER_PATH}/TriStripVisitor
|
||||||
|
${HEADER_PATH}/UpdateVisitor
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
CubeMapGenerator.cpp
|
||||||
|
CullVisitor.cpp
|
||||||
|
DelaunayTriangulator.cpp
|
||||||
|
DisplayRequirementsVisitor.cpp
|
||||||
|
GLObjectsVisitor.cpp
|
||||||
|
HalfWayMapGenerator.cpp
|
||||||
|
HighlightMapGenerator.cpp
|
||||||
|
IntersectVisitor.cpp
|
||||||
|
IntersectionVisitor.cpp
|
||||||
|
LineSegmentIntersector.cpp
|
||||||
|
Optimizer.cpp
|
||||||
|
PlaneIntersector.cpp
|
||||||
|
PolytopeIntersector.cpp
|
||||||
|
PositionalStateContainer.cpp
|
||||||
|
RenderBin.cpp
|
||||||
|
RenderLeaf.cpp
|
||||||
|
RenderStage.cpp
|
||||||
|
SceneView.cpp
|
||||||
|
Simplifier.cpp
|
||||||
|
SmoothingVisitor.cpp
|
||||||
|
StateGraph.cpp
|
||||||
|
Statistics.cpp
|
||||||
|
TangentSpaceGenerator.cpp
|
||||||
|
Tessellator.cpp
|
||||||
|
TransformAttributeFunctor.cpp
|
||||||
|
TransformCallback.cpp
|
||||||
|
TriStripVisitor.cpp
|
||||||
|
TriStrip_graph_array.h
|
||||||
|
TriStrip_heap_array.h
|
||||||
|
TriStrip_tri_stripper.cpp
|
||||||
|
TriStrip_tri_stripper.h
|
||||||
|
UpdateVisitor.cpp
|
||||||
|
Version.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
85
src/osgViewer/CMakeLists.txt
Normal file
85
src/osgViewer/CMakeLists.txt
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
|
||||||
|
# FIXME: For OS X, need flag for Framework or dylib
|
||||||
|
IF (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSGVIEWER_LIBRARY)
|
||||||
|
ELSE (DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
|
||||||
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
SET(LIB_NAME osgViewer)
|
||||||
|
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
|
||||||
|
SET(LIB_PUBLIC_HEADERS
|
||||||
|
${HEADER_PATH}/CompositeViewer
|
||||||
|
${HEADER_PATH}/Export
|
||||||
|
${HEADER_PATH}/GraphicsWindow
|
||||||
|
${HEADER_PATH}/HelpHandler
|
||||||
|
${HEADER_PATH}/Scene
|
||||||
|
${HEADER_PATH}/SimpleViewer
|
||||||
|
${HEADER_PATH}/StatsHandler
|
||||||
|
${HEADER_PATH}/Version
|
||||||
|
${HEADER_PATH}/View
|
||||||
|
${HEADER_PATH}/Viewer
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LIB_PRIVATE_HEADERS
|
||||||
|
${HEADER_PATH}/GraphicsWindowCarbon
|
||||||
|
${HEADER_PATH}/GraphicsWindowCocoa
|
||||||
|
${HEADER_PATH}/GraphicsWindowWin32
|
||||||
|
${HEADER_PATH}/GraphicsWindowX11
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(LIB_COMMON_FILES
|
||||||
|
CompositeViewer.cpp
|
||||||
|
Scene.cpp
|
||||||
|
SimpleViewer.cpp
|
||||||
|
StatsHandler.cpp
|
||||||
|
HelpHandler.cpp
|
||||||
|
Version.cpp
|
||||||
|
View.cpp
|
||||||
|
Viewer.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
${LIB_PRIVATE_HEADERS}
|
||||||
|
${LIB_COMMON_FILES}
|
||||||
|
GraphicsWindowWin32.cpp
|
||||||
|
)
|
||||||
|
ELSE(WIN32)
|
||||||
|
IF(APPLE)
|
||||||
|
# FIXME: OS X needs selection mechanism for Cocoa, Carbon, X11
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
${LIB_PRIVATE_HEADERS}
|
||||||
|
${LIB_COMMON_FILES}
|
||||||
|
GraphicsWindowCarbon.cpp
|
||||||
|
)
|
||||||
|
ELSE(APPLE)
|
||||||
|
# X11 for everybody else
|
||||||
|
ADD_LIBRARY(${LIB_NAME}
|
||||||
|
${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||||
|
${LIB_PUBLIC_HEADERS}
|
||||||
|
${LIB_PRIVATE_HEADERS}
|
||||||
|
${LIB_COMMON_FILES}
|
||||||
|
GraphicsWindowX11.cpp
|
||||||
|
)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${LIB_NAME}
|
||||||
|
osgGA
|
||||||
|
osgText
|
||||||
|
osgDB
|
||||||
|
osgUtil
|
||||||
|
osg
|
||||||
|
${OPENTHREADS_LIBRARY}
|
||||||
|
${OPENGL_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE(ModuleInstall OPTIONAL)
|
Loading…
Reference in New Issue
Block a user