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)
|
|
|
|
|
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_PREFIX "osgdb_")
|
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
|
|
|
|
SET(TARGET_COMMON_LIBRARIES
|
2007-05-03 18:10:23 +08:00
|
|
|
OpenThreads
|
2007-03-19 20:30:26 +08:00
|
|
|
osg
|
|
|
|
osgDB
|
|
|
|
osgUtil
|
|
|
|
)
|
|
|
|
|
2007-03-08 23:29:53 +08:00
|
|
|
IF (BUILD_OSG_COMMON_PLUGINS)
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plug commons")
|
|
|
|
###########################################################
|
|
|
|
# this is for asking the production of a single CMakeLists.txt
|
|
|
|
# the BUILD_CMAKELIST can be set at the macro call level or
|
|
|
|
# globally by configuring
|
|
|
|
# TARGET_DEFAULT_BUILD_CMAKELIST
|
|
|
|
#
|
|
|
|
# ADD_OSG_PLUGIN(osgFX osgFX BUILD_CMAKELIST)
|
|
|
|
#
|
|
|
|
###########################################################
|
|
|
|
ADD_SUBDIRECTORY(osgFX)
|
|
|
|
ADD_SUBDIRECTORY(osgParticle)
|
|
|
|
ADD_SUBDIRECTORY(osgSim)
|
|
|
|
ADD_SUBDIRECTORY(osgText)
|
2007-03-19 22:10:12 +08:00
|
|
|
ADD_SUBDIRECTORY(osgViewer)
|
|
|
|
ADD_SUBDIRECTORY(osgShadow)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(osga)
|
|
|
|
ADD_SUBDIRECTORY(rot)
|
|
|
|
ADD_SUBDIRECTORY(scale)
|
|
|
|
ADD_SUBDIRECTORY(trans)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(osg)
|
|
|
|
ADD_SUBDIRECTORY(ive)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF (BUILD_OSG_COMMON_PLUGINS)
|
|
|
|
|
|
|
|
IF (BUILD_OSG_IMAGE_PLUGINS)
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plug image" )#
|
|
|
|
ADD_SUBDIRECTORY(rgb)
|
|
|
|
ADD_SUBDIRECTORY(bmp)
|
|
|
|
ADD_SUBDIRECTORY(dds)
|
|
|
|
ADD_SUBDIRECTORY(tga)
|
|
|
|
ADD_SUBDIRECTORY(hdr)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
|
|
|
IF(JPEG_FOUND)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(jpeg)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(JPEG_FOUND)
|
2007-05-04 21:20:48 +08:00
|
|
|
IF(JASPER_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(jp2)
|
|
|
|
ENDIF(JASPER_FOUND)
|
2007-03-13 19:58:52 +08:00
|
|
|
IF(GIFLIB_FOUND)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(gif)
|
2007-03-13 19:58:52 +08:00
|
|
|
ENDIF(GIFLIB_FOUND)
|
2007-03-08 23:29:53 +08:00
|
|
|
IF(PNG_FOUND)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(png)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(PNG_FOUND)
|
|
|
|
IF(TIFF_FOUND)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(tiff)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(TIFF_FOUND)
|
|
|
|
|
|
|
|
ENDIF (BUILD_OSG_IMAGE_PLUGINS)
|
|
|
|
|
|
|
|
IF (BUILD_OSG_3D_PLUGINS)
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plug 3d")
|
|
|
|
ADD_SUBDIRECTORY(3dc)
|
2007-04-24 21:11:22 +08:00
|
|
|
|
2007-03-20 17:50:24 +08:00
|
|
|
IF(INVENTOR_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(Inventor)
|
|
|
|
ENDIF(INVENTOR_FOUND)
|
2007-04-24 21:11:22 +08:00
|
|
|
|
|
|
|
IF(VRML_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(vrml)
|
|
|
|
ENDIF(VRML_FOUND)
|
2007-05-04 22:25:02 +08:00
|
|
|
|
|
|
|
IF(COLLADA_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(dae)
|
|
|
|
ENDIF(COLLADA_FOUND)
|
|
|
|
|
2007-04-24 21:11:22 +08:00
|
|
|
ADD_SUBDIRECTORY(lwo)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(x)
|
|
|
|
ADD_SUBDIRECTORY(dw)
|
|
|
|
ADD_SUBDIRECTORY(dxf)
|
|
|
|
ADD_SUBDIRECTORY(OpenFlight)
|
|
|
|
ADD_SUBDIRECTORY(geo)
|
|
|
|
ADD_SUBDIRECTORY(obj)
|
2007-05-05 16:22:06 +08:00
|
|
|
ADD_SUBDIRECTORY(normals)
|
|
|
|
|
|
|
|
IF(PERFORMER_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(pfb)
|
|
|
|
ENDIF(PERFORMER_FOUND)
|
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(pic)
|
|
|
|
ADD_SUBDIRECTORY(stl)
|
|
|
|
ADD_SUBDIRECTORY(3ds)
|
|
|
|
ADD_SUBDIRECTORY(ac)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF (BUILD_OSG_3D_PLUGINS)
|
|
|
|
|
|
|
|
IF (BUILD_OSG_OTHER_PLUGINS)
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plug other")
|
2007-04-17 02:33:09 +08:00
|
|
|
ADD_SUBDIRECTORY(logo)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(lws)
|
|
|
|
ADD_SUBDIRECTORY(md2)
|
|
|
|
ADD_SUBDIRECTORY(osgtgz)
|
|
|
|
ADD_SUBDIRECTORY(tgz)
|
2007-05-05 03:17:49 +08:00
|
|
|
|
2007-04-21 19:24:26 +08:00
|
|
|
ADD_SUBDIRECTORY(txp)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(shp)
|
2007-03-19 22:10:12 +08:00
|
|
|
ADD_SUBDIRECTORY(txf)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-05-05 03:17:49 +08:00
|
|
|
IF(XINE_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(xine)
|
|
|
|
ENDIF(XINE_FOUND)
|
2007-04-17 02:33:09 +08:00
|
|
|
|
|
|
|
IF(QUICKTIME_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(quicktime)
|
|
|
|
ENDIF(QUICKTIME_FOUND)
|
|
|
|
|
2007-03-08 23:29:53 +08:00
|
|
|
IF(FREETYPE_FOUND)
|
2007-04-17 02:33:09 +08:00
|
|
|
ADD_SUBDIRECTORY(freetype)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF(FREETYPE_FOUND)
|
|
|
|
IF(ZLIB_FOUND)
|
2007-04-17 02:33:09 +08:00
|
|
|
ADD_SUBDIRECTORY(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)
|
2007-03-19 20:30:26 +08:00
|
|
|
ADD_SUBDIRECTORY(net)
|
2007-03-08 23:29:53 +08:00
|
|
|
ENDIF (BUILD_OSG_NET_PLUGINS)
|
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
#REWRITE_CMAKELIST(ADD_OSG_PLUGIN)
|
|
|
|
|
|
|
|
|
2007-03-08 23:29:53 +08:00
|
|
|
##########to get all the variables of Cmake
|
2007-03-19 20:30:26 +08:00
|
|
|
#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
|
|
|
|
#FOREACH(myvar ${MYVARS})
|
|
|
|
# FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
|
|
|
|
# "${myvar} -->${${myvar}}<-\n"
|
|
|
|
# )
|
|
|
|
#ENDFOREACH(myvar)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
|
|
|
|