2007-03-08 23:29:53 +08:00
|
|
|
#---------------------------------------------------
|
|
|
|
# OSG CMAKE SUPPORT
|
|
|
|
# (C) by Michael Wagner, mtw@shared-reality.com 2005
|
|
|
|
#---------------------------------------------------
|
|
|
|
|
|
|
|
PROJECT(OSG_PLUGINS_MASTER)
|
|
|
|
|
|
|
|
|
|
|
|
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/osgPlugins")
|
|
|
|
|
|
|
|
|
|
|
|
OPTION(BUILD_OSG_COMMON_PLUGINS "Build with Common Plugins" TRUE)
|
|
|
|
OPTION(BUILD_OSG_IMAGE_PLUGINS "Build with Imagege texture Plugins" TRUE)
|
|
|
|
OPTION(BUILD_OSG_3D_PLUGINS "Build with 3D formats Plugins" TRUE)
|
|
|
|
OPTION(BUILD_OSG_OTHER_PLUGINS "Build with other formats Plugins" TRUE)
|
|
|
|
OPTION(BUILD_OSG_NET_PLUGINS "Build with net Plugin" TRUE)
|
|
|
|
|
|
|
|
IF(NOT MINGW)
|
|
|
|
SET(CMAKE_SHARED_MODULE_PREFIX "")
|
|
|
|
ENDIF(NOT MINGW)
|
|
|
|
|
|
|
|
INCLUDE(OsgMacroUtils)
|
|
|
|
|
|
|
|
|
|
|
|
IF (BUILD_OSG_COMMON_PLUGINS)
|
|
|
|
ADD_OSG_PLUGIN(osgFX osgFX)
|
|
|
|
ADD_OSG_PLUGIN(osgParticle osgParticle)
|
|
|
|
ADD_OSG_PLUGIN(osgSim osgSim)
|
|
|
|
ADD_OSG_PLUGIN(osgText osgText)
|
|
|
|
ADD_OSG_PLUGIN(osga)
|
|
|
|
ADD_OSG_PLUGIN(rot)
|
|
|
|
ADD_OSG_PLUGIN(scale)
|
|
|
|
ADD_OSG_PLUGIN(trans)
|
|
|
|
|
|
|
|
ADD_OSG_PLUGIN(osg osgSim osgFX osgText)
|
|
|
|
ADD_OSG_PLUGIN(ive osgSim osgFX osgText)
|
|
|
|
ENDIF (BUILD_OSG_COMMON_PLUGINS)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ac)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF (BUILD_OSG_3D_PLUGINS)
|
|
|
|
|
|
|
|
IF (BUILD_OSG_OTHER_PLUGINS)
|
|
|
|
ADD_OSG_PLUGIN(logo)
|
|
|
|
ADD_OSG_PLUGIN(lws)
|
|
|
|
ADD_OSG_PLUGIN(md2)
|
|
|
|
ADD_OSG_PLUGIN(osgtgz)
|
|
|
|
#ADD_OSG_PLUGIN(quicktime)
|
|
|
|
ADD_OSG_PLUGIN(tgz)
|
|
|
|
#ADD_OSG_PLUGIN(txp)
|
|
|
|
#ADD_OSG_PLUGIN(xine)
|
2007-03-11 21:23:06 +08:00
|
|
|
ADD_OSG_PLUGIN(shp)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
|
|
|
IF(FREETYPE_FOUND)
|
2007-03-09 05:19:27 +08:00
|
|
|
SUBDIRS( freetype )
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(FREETYPE_FOUND)
|
|
|
|
IF(ZLIB_FOUND)
|
2007-03-09 05:19:27 +08:00
|
|
|
ADD_OSG_PLUGIN(zip )
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(ZLIB_FOUND)
|
|
|
|
|
|
|
|
ENDIF (BUILD_OSG_OTHER_PLUGINS)
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------
|
|
|
|
# ADD ALL PLUGINS
|
|
|
|
#---------------------------------------------------
|
|
|
|
|
|
|
|
IF (BUILD_OSG_NET_PLUGINS)
|
|
|
|
ADD_OSG_PLUGIN(net ${OSG_SOCKET_LIBS})
|
|
|
|
ENDIF (BUILD_OSG_NET_PLUGINS)
|
|
|
|
|
|
|
|
##########to get all the variables of Cmake
|
|
|
|
GET_CMAKE_PROPERTY(MYVARS VARIABLES)
|
|
|
|
FOREACH(myvar ${MYVARS})
|
|
|
|
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
|
|
|
|
"${myvar} -->${${myvar}}<-\n"
|
|
|
|
)
|
|
|
|
ENDFOREACH(myvar)
|
|
|
|
|
|
|
|
|