2007-03-08 23:29:53 +08:00
|
|
|
#---------------------------------------------------
|
2008-10-15 00:35:03 +08:00
|
|
|
# OSG CMAKE SUPPORT
|
2007-03-08 23:29:53 +08:00
|
|
|
# (C) by Michael Wagner, mtw@shared-reality.com 2005
|
2007-05-05 23:36:03 +08:00
|
|
|
# (C) Eric Wing, Luigi Calori and Robert Osfield 2006-2007
|
2007-03-08 23:29:53 +08:00
|
|
|
#---------------------------------------------------
|
|
|
|
|
|
|
|
PROJECT(OSG_PLUGINS_MASTER)
|
|
|
|
|
|
|
|
|
2007-08-30 18:41:15 +08:00
|
|
|
IF(NOT MSVC)
|
2007-09-06 01:03:43 +08:00
|
|
|
SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
|
2008-05-27 06:36:58 +08:00
|
|
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
|
2007-08-30 18:41:15 +08:00
|
|
|
ENDIF(NOT MSVC)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-10-03 05:26:22 +08:00
|
|
|
SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-12-09 01:04:52 +08:00
|
|
|
IF(MSVC80)
|
2007-12-12 17:48:39 +08:00
|
|
|
IF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
|
|
|
|
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
|
|
|
|
ENDIF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
|
2007-12-09 01:04:52 +08:00
|
|
|
ENDIF(MSVC80)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
SET(TARGET_DEFAULT_PREFIX "osgdb_")
|
|
|
|
SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
|
2008-10-15 00:35:03 +08:00
|
|
|
SET(TARGET_COMMON_LIBRARIES
|
2007-10-03 05:26:22 +08:00
|
|
|
OpenThreads
|
2008-10-15 00:35:03 +08:00
|
|
|
osg
|
|
|
|
osgDB
|
2007-09-06 01:03:43 +08:00
|
|
|
osgUtil
|
2007-03-19 20:30:26 +08:00
|
|
|
)
|
|
|
|
|
2007-07-14 03:22:09 +08:00
|
|
|
############################################################
|
2007-03-19 20:30:26 +08:00
|
|
|
#
|
2007-07-14 03:22:09 +08:00
|
|
|
# NodeKit/Psudo loader plugins
|
2007-03-19 20:30:26 +08:00
|
|
|
#
|
2007-07-14 03:22:09 +08:00
|
|
|
ADD_SUBDIRECTORY(osgFX)
|
|
|
|
ADD_SUBDIRECTORY(osgParticle)
|
|
|
|
ADD_SUBDIRECTORY(osgSim)
|
|
|
|
ADD_SUBDIRECTORY(osgText)
|
|
|
|
ADD_SUBDIRECTORY(osgViewer)
|
|
|
|
ADD_SUBDIRECTORY(osgShadow)
|
2007-08-07 23:30:05 +08:00
|
|
|
ADD_SUBDIRECTORY(osgTerrain)
|
2007-07-14 03:22:09 +08:00
|
|
|
ADD_SUBDIRECTORY(osga)
|
|
|
|
ADD_SUBDIRECTORY(rot)
|
|
|
|
ADD_SUBDIRECTORY(scale)
|
|
|
|
ADD_SUBDIRECTORY(trans)
|
|
|
|
ADD_SUBDIRECTORY(normals)
|
|
|
|
|
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# Main native plugins
|
|
|
|
#
|
|
|
|
ADD_SUBDIRECTORY(osg)
|
|
|
|
ADD_SUBDIRECTORY(ive)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-12-05 19:23:27 +08:00
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# Viewer plugins
|
|
|
|
#
|
|
|
|
ADD_SUBDIRECTORY(cfg)
|
|
|
|
|
2008-03-04 22:04:48 +08:00
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# Shader plugins
|
|
|
|
#
|
|
|
|
ADD_SUBDIRECTORY(glsl)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2007-07-14 03:22:09 +08:00
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# Image plugins
|
|
|
|
#
|
|
|
|
ADD_SUBDIRECTORY(rgb)
|
|
|
|
ADD_SUBDIRECTORY(bmp)
|
|
|
|
ADD_SUBDIRECTORY(pnm)
|
|
|
|
ADD_SUBDIRECTORY(dds)
|
|
|
|
ADD_SUBDIRECTORY(tga)
|
|
|
|
ADD_SUBDIRECTORY(hdr)
|
2008-10-15 00:35:03 +08:00
|
|
|
ADD_SUBDIRECTORY(dot)
|
2007-07-14 03:22:09 +08:00
|
|
|
|
|
|
|
IF(JPEG_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(jpeg)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(JPEG_FOUND)
|
|
|
|
IF(JASPER_FOUND)
|
2008-10-15 00:35:03 +08:00
|
|
|
ADD_SUBDIRECTORY(jp2)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(JASPER_FOUND)
|
|
|
|
IF(GIFLIB_FOUND)
|
2008-10-15 00:35:03 +08:00
|
|
|
ADD_SUBDIRECTORY(gif)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(GIFLIB_FOUND)
|
|
|
|
IF(PNG_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(png)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(PNG_FOUND)
|
|
|
|
IF(TIFF_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(tiff)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(TIFF_FOUND)
|
2007-08-07 18:33:25 +08:00
|
|
|
IF(GDAL_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(gdal)
|
2008-01-21 20:01:55 +08:00
|
|
|
ADD_SUBDIRECTORY(ogr)
|
2007-08-07 18:33:25 +08:00
|
|
|
ENDIF(GDAL_FOUND)
|
2007-07-14 03:22:09 +08:00
|
|
|
|
2008-03-21 21:08:02 +08:00
|
|
|
IF(CURL_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(curl)
|
|
|
|
ENDIF(CURL_FOUND)
|
|
|
|
|
2008-10-10 01:02:16 +08:00
|
|
|
IF(ZLIB_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(gz)
|
|
|
|
ENDIF(ZLIB_FOUND)
|
|
|
|
|
2008-11-20 19:27:36 +08:00
|
|
|
IF(XUL_FOUND)
|
|
|
|
IF (WIN32 OR APPLE OR GTK_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(gecko)
|
|
|
|
ENDIF(WIN32 OR APPLE OR GTK_FOUND)
|
|
|
|
ENDIF(XUL_FOUND)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-23 00:39:17 +08:00
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# 3D Image plugins
|
|
|
|
#
|
2008-09-16 03:59:12 +08:00
|
|
|
IF (ITK_FOUND OR DCMTK_FOUND)
|
2008-08-23 00:39:17 +08:00
|
|
|
ADD_SUBDIRECTORY(dicom)
|
2008-09-16 03:59:12 +08:00
|
|
|
ENDIF(ITK_FOUND OR DCMTK_FOUND)
|
2008-08-23 00:39:17 +08:00
|
|
|
|
|
|
|
|
2007-07-14 03:22:09 +08:00
|
|
|
############################################################
|
|
|
|
#
|
|
|
|
# 3rd party 3d plugins
|
|
|
|
#
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(3dc)
|
|
|
|
|
|
|
|
IF(INVENTOR_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(Inventor)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(INVENTOR_FOUND)
|
|
|
|
|
|
|
|
IF(OPENVRML_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(vrml)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(OPENVRML_FOUND)
|
|
|
|
|
|
|
|
IF(COLLADA_FOUND)
|
2007-09-06 01:03:43 +08:00
|
|
|
ADD_SUBDIRECTORY(dae)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(COLLADA_FOUND)
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(lwo)
|
|
|
|
ADD_SUBDIRECTORY(x)
|
|
|
|
ADD_SUBDIRECTORY(dw)
|
|
|
|
ADD_SUBDIRECTORY(dxf)
|
|
|
|
ADD_SUBDIRECTORY(OpenFlight)
|
2008-11-10 21:56:59 +08:00
|
|
|
# ADD_SUBDIRECTORY(flt)
|
2007-07-14 03:22:09 +08:00
|
|
|
ADD_SUBDIRECTORY(geo)
|
|
|
|
ADD_SUBDIRECTORY(obj)
|
|
|
|
|
|
|
|
IF(PERFORMER_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(pfb)
|
|
|
|
ENDIF(PERFORMER_FOUND)
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(pic)
|
|
|
|
ADD_SUBDIRECTORY(stl)
|
|
|
|
ADD_SUBDIRECTORY(3ds)
|
|
|
|
ADD_SUBDIRECTORY(ac)
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(logo)
|
|
|
|
ADD_SUBDIRECTORY(lws)
|
|
|
|
ADD_SUBDIRECTORY(md2)
|
|
|
|
ADD_SUBDIRECTORY(osgtgz)
|
|
|
|
ADD_SUBDIRECTORY(tgz)
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(txp)
|
|
|
|
ADD_SUBDIRECTORY(shp)
|
|
|
|
ADD_SUBDIRECTORY(txf)
|
|
|
|
|
|
|
|
IF(XINE_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(xine)
|
|
|
|
ENDIF(XINE_FOUND)
|
|
|
|
|
|
|
|
IF(QUICKTIME_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(quicktime)
|
|
|
|
ENDIF(QUICKTIME_FOUND)
|
|
|
|
|
|
|
|
IF(FREETYPE_FOUND)
|
2008-10-15 00:35:03 +08:00
|
|
|
ADD_SUBDIRECTORY(freetype)
|
2007-07-14 03:22:09 +08:00
|
|
|
ENDIF(FREETYPE_FOUND)
|
|
|
|
IF(ZLIB_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(zip)
|
|
|
|
ENDIF(ZLIB_FOUND)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2008-05-11 22:26:27 +08:00
|
|
|
IF(RSVG_FOUND AND CAIRO_FOUND)
|
2008-05-11 22:23:19 +08:00
|
|
|
ADD_SUBDIRECTORY(svg)
|
2008-05-11 22:26:27 +08:00
|
|
|
ENDIF(RSVG_FOUND AND CAIRO_FOUND)
|
2007-03-19 20:30:26 +08:00
|
|
|
|
2008-07-16 01:21:25 +08:00
|
|
|
IF (BUILD_OSGWIDGET)
|
|
|
|
ADD_SUBDIRECTORY(osgWidget)
|
|
|
|
ENDIF(BUILD_OSGWIDGET)
|
|
|
|
|
2008-11-03 23:57:21 +08:00
|
|
|
IF (LIBVNCSERVER_FOUND)
|
|
|
|
ADD_SUBDIRECTORY(vnc)
|
|
|
|
ENDIF(LIBVNCSERVER_FOUND)
|
|
|
|
|
2007-03-19 20:30:26 +08:00
|
|
|
|
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})
|
2007-09-06 01:03:43 +08:00
|
|
|
# FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
|
|
|
|
# "${myvar} -->${${myvar}}<-\n"
|
|
|
|
# )
|
2007-03-19 20:30:26 +08:00
|
|
|
#ENDFOREACH(myvar)
|
2007-03-08 23:29:53 +08:00
|
|
|
|
2008-10-15 00:35:03 +08:00
|
|
|
|