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

Revision 10611, 4.5 kB (checked in by robert, 5 years ago)

Introduced optional build against the GLU library, using optional compile paths to enable/disable GLU related function.

To toggle the use of the GLU library adjust the OSG_GLU_AVAILABLE variable via ccmake . or CMakeSetup.

  • 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)
[10013]167ADD_SUBDIRECTORY(ply)
[7119]168ADD_SUBDIRECTORY(dxf)
169ADD_SUBDIRECTORY(OpenFlight)
[9139]170# ADD_SUBDIRECTORY(flt)
[7119]171ADD_SUBDIRECTORY(geo)
172ADD_SUBDIRECTORY(obj)
[6320]173
[7119]174IF(PERFORMER_FOUND)
175    ADD_SUBDIRECTORY(pfb)
[9949]176ENDIF()
[6320]177
[7119]178ADD_SUBDIRECTORY(pic)
179ADD_SUBDIRECTORY(stl)
180ADD_SUBDIRECTORY(3ds)
181ADD_SUBDIRECTORY(ac)
[6320]182
[7119]183ADD_SUBDIRECTORY(logo)
184ADD_SUBDIRECTORY(lws)
185ADD_SUBDIRECTORY(md2)
186ADD_SUBDIRECTORY(osgtgz)
187ADD_SUBDIRECTORY(tgz)
[6320]188
[7119]189ADD_SUBDIRECTORY(txp)
190ADD_SUBDIRECTORY(shp)
191ADD_SUBDIRECTORY(txf)
[6320]192
[9425]193ADD_SUBDIRECTORY(bsp)
194ADD_SUBDIRECTORY(mdl)
195
[7119]196IF(XINE_FOUND)
197    ADD_SUBDIRECTORY(xine)
[9949]198ENDIF()
[6375]199
[9817]200IF(FFMPEG_FOUND)
201    ADD_SUBDIRECTORY(ffmpeg)
[9949]202ENDIF()
[9817]203
[9855]204# IF(OPENAL_FOUND)
205#    ADD_SUBDIRECTORY(OpenAL)
[9949]206# ENDIF()
[9847]207
[9880]208IF(APPLE)
209    ADD_SUBDIRECTORY(imageio)
[9949]210ENDIF()
[9880]211
[7119]212IF(QUICKTIME_FOUND)
213    ADD_SUBDIRECTORY(quicktime)
[9949]214ENDIF()
[6375]215
[7119]216IF(FREETYPE_FOUND)
[9030]217    ADD_SUBDIRECTORY(freetype)
[9949]218ENDIF()
219
[7119]220IF(ZLIB_FOUND)
221    ADD_SUBDIRECTORY(zip)
[9949]222ENDIF()
[7119]223
[8303]224IF(RSVG_FOUND AND CAIRO_FOUND)
[8302]225    ADD_SUBDIRECTORY(svg)
[9949]226ENDIF()
[7119]227
[9949]228IF(POPPLER_FOUND AND CAIRO_FOUND)
[9319]229    ADD_SUBDIRECTORY(pdf)
[9949]230ENDIF()
[7119]231
[9949]232IF(LIBVNCSERVER_FOUND)
[9089]233    ADD_SUBDIRECTORY(vnc)
[9949]234ENDIF()
[8588]235
[6320]236##########to get all the variables of Cmake
[6375]237#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
238#FOREACH(myvar ${MYVARS})
[7364]239#    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
240#        "${myvar} -->${${myvar}}<-\n"
241#    )
[6375]242#ENDFOREACH(myvar)
[6320]243
[9030]244
Note: See TracBrowser for help on using the browser.