root/OpenSceneGraph/trunk/src/osgPlugins/CMakeLists.txt @ 10763

Revision 10763, 4.5 kB (checked in by robert, 4 years ago)

Added OSG_CPP_EXCEPTIONS_AVAILABLE cmake option to enable optional build of plugins and examples that required C++ exceptions

  • Property svn:eol-style set to native
RevLine 
[6320]1#---------------------------------------------------
[9030]2# OSG CMAKE SUPPORT
[6320]3# (C) by Michael Wagner, mtw@shared-reality.com 2005
[6610]4# (C) Eric Wing, Luigi Calori and Robert Osfield 2006-2007
[6320]5#---------------------------------------------------
6
7PROJECT(OSG_PLUGINS_MASTER)
8
[9949]9IF(NOT DYNAMIC_OPENSCENEGRAPH)
[9336]10    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
[9949]11ENDIF()
[6320]12
[7322]13IF(NOT MSVC)
[7364]14    SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
[8358]15    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
[9949]16ENDIF()
[6320]17
[7537]18SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
[6320]19
[7629]20IF(MSVC80)
[9949]21    IF(NOT OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS)
22        SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
23    ENDIF()
24ENDIF()
[6320]25
[6375]26SET(TARGET_DEFAULT_PREFIX "osgdb_")
27SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
[9030]28SET(TARGET_COMMON_LIBRARIES
[7537]29    OpenThreads
[9030]30    osg
31    osgDB
[7364]32    osgUtil
[6375]33)
34
[7119]35############################################################
[6375]36#
[7119]37#  NodeKit/Psudo loader plugins
[6375]38#
[9212]39ADD_SUBDIRECTORY(osgAnimation)
[7119]40ADD_SUBDIRECTORY(osgFX)
41ADD_SUBDIRECTORY(osgParticle)
42ADD_SUBDIRECTORY(osgSim)
43ADD_SUBDIRECTORY(osgText)
44ADD_SUBDIRECTORY(osgViewer)
45ADD_SUBDIRECTORY(osgShadow)
[7199]46ADD_SUBDIRECTORY(osgTerrain)
[9495]47ADD_SUBDIRECTORY(osgVolume)
[9213]48ADD_SUBDIRECTORY(osgWidget)
[7119]49ADD_SUBDIRECTORY(osga)
50ADD_SUBDIRECTORY(rot)
51ADD_SUBDIRECTORY(scale)
52ADD_SUBDIRECTORY(trans)
53ADD_SUBDIRECTORY(normals)
[10293]54ADD_SUBDIRECTORY(revisions)
[6320]55
[7119]56############################################################
57#
58#  Main native plugins
59#
60ADD_SUBDIRECTORY(osg)
61ADD_SUBDIRECTORY(ive)
[6320]62
[7602]63############################################################
64#
65#  Viewer plugins
66#
67ADD_SUBDIRECTORY(cfg)
[6320]68
[7908]69############################################################
70#
71#  Shader plugins
72#
73ADD_SUBDIRECTORY(glsl)
[7602]74
[7119]75############################################################
76#
77#  Image plugins
78#
79ADD_SUBDIRECTORY(rgb)
80ADD_SUBDIRECTORY(bmp)
81ADD_SUBDIRECTORY(pnm)
82ADD_SUBDIRECTORY(dds)
83ADD_SUBDIRECTORY(tga)
84ADD_SUBDIRECTORY(hdr)
[9030]85ADD_SUBDIRECTORY(dot)
[9425]86ADD_SUBDIRECTORY(vtf)
[6606]87
[7119]88IF(JPEG_FOUND)
[7364]89    ADD_SUBDIRECTORY(jpeg)
[9949]90ENDIF()
[7119]91IF(JASPER_FOUND)
[9030]92    ADD_SUBDIRECTORY(jp2)
[9949]93ENDIF()
[9261]94IF(OPENEXR_FOUND)
[9274]95    ADD_SUBDIRECTORY(exr)
[9949]96ENDIF()
[7119]97IF(GIFLIB_FOUND)
[9030]98    ADD_SUBDIRECTORY(gif)
[9949]99ENDIF()
[7119]100IF(PNG_FOUND)
[7364]101    ADD_SUBDIRECTORY(png)
[9949]102ENDIF()
[7119]103IF(TIFF_FOUND)
[7364]104    ADD_SUBDIRECTORY(tiff)
[9949]105ENDIF()
[7196]106IF(GDAL_FOUND)
[7364]107    ADD_SUBDIRECTORY(gdal)
[7827]108    ADD_SUBDIRECTORY(ogr)
[9949]109ENDIF()
[6609]110
[9188]111IF(XUL_FOUND)
[9949]112    IF(WIN32 OR APPLE OR GTK_FOUND)
[9188]113        ADD_SUBDIRECTORY(gecko)
[9949]114    ENDIF()
115ENDIF()
[9188]116
117
118
[7119]119############################################################
120#
[8782]121# 3D Image plugins
122#
[9949]123IF(DCMTK_FOUND AND ZLIB_FOUND)
[8782]124    ADD_SUBDIRECTORY(dicom)
[9949]125ELSE()
126    IF(ITK_FOUND)
[9490]127        ADD_SUBDIRECTORY(dicom)
[9949]128    ENDIF()
129ENDIF()
[9490]130
[8782]131############################################################
132#
[7119]133#  3rd party 3d plugins
134#
[6609]135
[7119]136ADD_SUBDIRECTORY(3dc)
[6320]137
[10122]138ADD_SUBDIRECTORY(p3d)
[10108]139
[9304]140IF(CURL_FOUND)
141    ADD_SUBDIRECTORY(curl)
[9949]142ENDIF()
[9304]143
144IF(ZLIB_FOUND)
145    ADD_SUBDIRECTORY(gz)
[9949]146ENDIF()
[9304]147
[7119]148IF(INVENTOR_FOUND)
[7364]149    ADD_SUBDIRECTORY(Inventor)
[9949]150ENDIF()
[6607]151
[7119]152IF(OPENVRML_FOUND)
[7364]153    ADD_SUBDIRECTORY(vrml)
[9949]154ENDIF()
[6320]155
[7119]156IF(COLLADA_FOUND)
[7364]157    ADD_SUBDIRECTORY(dae)
[9949]158ENDIF()
[6507]159
[10611]160IF(OSG_GLU_AVAILABLE)
161    ADD_SUBDIRECTORY(lwo)
162    ADD_SUBDIRECTORY(dw)
163ENDIF()
164
[9304]165ADD_SUBDIRECTORY(bvh)
[7119]166ADD_SUBDIRECTORY(x)
167ADD_SUBDIRECTORY(dxf)
168ADD_SUBDIRECTORY(OpenFlight)
[9139]169# ADD_SUBDIRECTORY(flt)
[7119]170ADD_SUBDIRECTORY(geo)
171ADD_SUBDIRECTORY(obj)
[6320]172
[7119]173IF(PERFORMER_FOUND)
174    ADD_SUBDIRECTORY(pfb)
[9949]175ENDIF()
[6320]176
[7119]177ADD_SUBDIRECTORY(pic)
178ADD_SUBDIRECTORY(stl)
179ADD_SUBDIRECTORY(3ds)
180ADD_SUBDIRECTORY(ac)
[6320]181
[7119]182ADD_SUBDIRECTORY(logo)
183ADD_SUBDIRECTORY(lws)
184ADD_SUBDIRECTORY(md2)
185ADD_SUBDIRECTORY(osgtgz)
186ADD_SUBDIRECTORY(tgz)
[6320]187
[7119]188ADD_SUBDIRECTORY(shp)
189ADD_SUBDIRECTORY(txf)
[6320]190
[9425]191ADD_SUBDIRECTORY(bsp)
192ADD_SUBDIRECTORY(mdl)
193
[10763]194IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
195    ADD_SUBDIRECTORY(ply)
196    ADD_SUBDIRECTORY(txp)
197ENDIF()
198
[7119]199IF(XINE_FOUND)
200    ADD_SUBDIRECTORY(xine)
[9949]201ENDIF()
[6375]202
[9817]203IF(FFMPEG_FOUND)
204    ADD_SUBDIRECTORY(ffmpeg)
[9949]205ENDIF()
[9817]206
[9855]207# IF(OPENAL_FOUND)
208#    ADD_SUBDIRECTORY(OpenAL)
[9949]209# ENDIF()
[9847]210
[9880]211IF(APPLE)
212    ADD_SUBDIRECTORY(imageio)
[9949]213ENDIF()
[9880]214
[7119]215IF(QUICKTIME_FOUND)
216    ADD_SUBDIRECTORY(quicktime)
[9949]217ENDIF()
[6375]218
[7119]219IF(FREETYPE_FOUND)
[9030]220    ADD_SUBDIRECTORY(freetype)
[9949]221ENDIF()
222
[7119]223IF(ZLIB_FOUND)
224    ADD_SUBDIRECTORY(zip)
[9949]225ENDIF()
[7119]226
[8303]227IF(RSVG_FOUND AND CAIRO_FOUND)
[8302]228    ADD_SUBDIRECTORY(svg)
[9949]229ENDIF()
[7119]230
[9949]231IF(POPPLER_FOUND AND CAIRO_FOUND)
[9319]232    ADD_SUBDIRECTORY(pdf)
[9949]233ENDIF()
[7119]234
[9949]235IF(LIBVNCSERVER_FOUND)
[9089]236    ADD_SUBDIRECTORY(vnc)
[9949]237ENDIF()
[8588]238
[6320]239##########to get all the variables of Cmake
[6375]240#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
241#FOREACH(myvar ${MYVARS})
[7364]242#    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
243#        "${myvar} -->${${myvar}}<-\n"
244#    )
[6375]245#ENDFOREACH(myvar)
[6320]246
[9030]247
Note: See TracBrowser for help on using the browser.