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

Revision 13172, 5.2 kB (checked in by robert, 3 hours ago)

Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.

To select standard OpenGL 1/2 build with full backwards and forwards comtability use:

./configure
make

OR

./configure -DOPENGL_PROFILE=GL2

To select OpenGL 3 core profile build using GL3/gl3.h header:

./configure -DOPENGL_PROFILE=GL3

To select OpenGL Arb core profile build using GL/glcorearb.h header:

./configure -DOPENGL_PROFILE=GLCORE

To select OpenGL ES 1.1 profile use:

./configure -DOPENGL_PROFILE=GLES1

To select OpenGL ES 2 profile use:

./configure -DOPENGL_PROFILE=GLES2

Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.

  • Property svn:eol-style set to native
Line 
1#---------------------------------------------------
2# OSG CMAKE SUPPORT
3# (C) by Michael Wagner, mtw@shared-reality.com 2005
4# (C) Eric Wing, Luigi Calori and Robert Osfield 2006-2007
5#---------------------------------------------------
6
7PROJECT(OSG_PLUGINS_MASTER)
8
9IF(NOT DYNAMIC_OPENSCENEGRAPH)
10    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
11ENDIF()
12
13IF(NOT MSVC)
14    SET(LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}/${OSG_PLUGINS}")
15    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${OSG_PLUGINS}")
16ENDIF()
17
18SET(CMAKE_SHARED_MODULE_PREFIX ${OSG_PLUGIN_PREFIX})
19
20IF(MSVC80 OR MSVC90)
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()
25
26SET(TARGET_DEFAULT_PREFIX "osgdb_")
27SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
28SET(TARGET_COMMON_LIBRARIES
29    OpenThreads
30    osg
31    osgDB
32    osgUtil
33)
34
35############################################################
36#
37#  NodeKit/Psudo loader plugins
38#
39ADD_SUBDIRECTORY(osga)
40ADD_SUBDIRECTORY(rot)
41ADD_SUBDIRECTORY(scale)
42ADD_SUBDIRECTORY(trans)
43ADD_SUBDIRECTORY(normals)
44ADD_SUBDIRECTORY(revisions)
45ADD_SUBDIRECTORY(view)
46ADD_SUBDIRECTORY(shadow)
47ADD_SUBDIRECTORY(terrain)
48
49############################################################
50#
51#  Main native plugins
52#
53ADD_SUBDIRECTORY(osg)
54ADD_SUBDIRECTORY(ive)
55
56############################################################
57#
58#  Viewer plugins
59#
60ADD_SUBDIRECTORY(cfg)
61
62############################################################
63#
64#  Shader plugins
65#
66ADD_SUBDIRECTORY(glsl)
67
68############################################################
69#
70#  Image plugins
71#
72ADD_SUBDIRECTORY(rgb)
73ADD_SUBDIRECTORY(bmp)
74ADD_SUBDIRECTORY(pnm)
75ADD_SUBDIRECTORY(dds)
76ADD_SUBDIRECTORY(tga)
77ADD_SUBDIRECTORY(hdr)
78ADD_SUBDIRECTORY(dot)
79ADD_SUBDIRECTORY(vtf)
80ADD_SUBDIRECTORY(ktx)
81
82IF(JPEG_FOUND)
83    ADD_SUBDIRECTORY(jpeg)
84ENDIF()
85IF(JASPER_FOUND)
86    ADD_SUBDIRECTORY(jp2)
87ENDIF()
88IF(OPENEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
89    ADD_SUBDIRECTORY(exr)
90ENDIF()
91IF(GIFLIB_FOUND)
92    ADD_SUBDIRECTORY(gif)
93ENDIF()
94IF(PNG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
95    ADD_SUBDIRECTORY(png)
96ENDIF()
97IF(TIFF_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
98    ADD_SUBDIRECTORY(tiff)
99ENDIF()
100IF(GDAL_FOUND)
101    ADD_SUBDIRECTORY(gdal)
102    ADD_SUBDIRECTORY(ogr)
103ENDIF()
104IF(GTA_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
105    ADD_SUBDIRECTORY(gta)
106ENDIF()
107
108
109############################################################
110#
111# 3D Image plugins
112#
113IF(DCMTK_FOUND AND ZLIB_FOUND)
114    ADD_SUBDIRECTORY(dicom)
115ELSE()
116    IF(ITK_FOUND)
117        ADD_SUBDIRECTORY(dicom)
118    ENDIF()
119ENDIF()
120
121############################################################
122#
123#  3rd party 3d plugins
124#
125
126ADD_SUBDIRECTORY(3dc)
127
128ADD_SUBDIRECTORY(p3d)
129
130IF(CURL_FOUND)
131    ADD_SUBDIRECTORY(curl)
132ENDIF()
133
134IF(ZLIB_FOUND)
135    ADD_SUBDIRECTORY(gz)
136ENDIF()
137
138IF(NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE)
139    IF(INVENTOR_FOUND)
140        ADD_SUBDIRECTORY(Inventor)
141    ENDIF()
142
143    IF(PERFORMER_FOUND)
144        ADD_SUBDIRECTORY(pfb)
145    ENDIF()
146ENDIF()
147
148IF(OPENVRML_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
149    ADD_SUBDIRECTORY(vrml)
150ENDIF()
151
152IF(COLLADA_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
153    ADD_SUBDIRECTORY(dae)
154ENDIF()
155
156IF(FBX_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
157    ADD_SUBDIRECTORY(fbx)
158ENDIF()
159
160ADD_SUBDIRECTORY(dw)
161
162ADD_SUBDIRECTORY(bvh)
163ADD_SUBDIRECTORY(x)
164ADD_SUBDIRECTORY(dxf)
165ADD_SUBDIRECTORY(OpenFlight)
166# ADD_SUBDIRECTORY(flt)
167ADD_SUBDIRECTORY(geo)
168ADD_SUBDIRECTORY(obj)
169
170ADD_SUBDIRECTORY(pic)
171ADD_SUBDIRECTORY(stl)
172IF(NOT ANDROID)
173    ADD_SUBDIRECTORY(3ds)
174ENDIF()
175ADD_SUBDIRECTORY(ac)
176ADD_SUBDIRECTORY(pov)
177
178ADD_SUBDIRECTORY(logo)
179ADD_SUBDIRECTORY(lws)
180ADD_SUBDIRECTORY(md2)
181ADD_SUBDIRECTORY(osgtgz)
182ADD_SUBDIRECTORY(tgz)
183
184ADD_SUBDIRECTORY(shp)
185ADD_SUBDIRECTORY(txf)
186
187ADD_SUBDIRECTORY(bsp)
188ADD_SUBDIRECTORY(mdl)
189
190IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
191    ADD_SUBDIRECTORY(lwo)
192    ADD_SUBDIRECTORY(ply)
193    ADD_SUBDIRECTORY(txp)
194ENDIF()
195
196IF(XINE_FOUND)
197    ADD_SUBDIRECTORY(xine)
198ENDIF()
199
200IF(FFMPEG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE)
201    ADD_SUBDIRECTORY(ffmpeg)
202ENDIF()
203
204IF(DIRECTSHOW_FOUND)
205    ADD_SUBDIRECTORY(directshow)
206ENDIF()
207
208# IF(OPENAL_FOUND)
209#    ADD_SUBDIRECTORY(OpenAL)
210# ENDIF()
211
212IF(APPLE AND NOT ANDROID)
213    ADD_SUBDIRECTORY(imageio)
214ENDIF()
215
216IF(AV_FOUNDATION_FOUND)
217    ADD_SUBDIRECTORY(avfoundation)
218ENDIF()
219
220IF(QUICKTIME_FOUND)
221    ADD_SUBDIRECTORY(quicktime)
222ENDIF()
223
224IF(QTKIT_FOUND)
225    ADD_SUBDIRECTORY(QTKit)
226ENDIF()
227
228IF(NVTT_FOUND)
229    ADD_SUBDIRECTORY(nvtt)
230ENDIF()
231
232
233IF(FREETYPE_FOUND)
234    ADD_SUBDIRECTORY(freetype)
235ENDIF()
236
237IF (QT4_FOUND)
238    ADD_SUBDIRECTORY(qfont)
239ENDIF()
240
241IF(ZLIB_FOUND)
242    ADD_SUBDIRECTORY(zip)
243ENDIF()
244
245IF(RSVG_FOUND)
246    ADD_SUBDIRECTORY(svg)
247ENDIF()
248
249IF(POPPLER_FOUND)
250    ADD_SUBDIRECTORY(pdf)
251ENDIF()
252
253IF(LIBVNCSERVER_FOUND)
254    ADD_SUBDIRECTORY(vnc)
255ENDIF()
256
257ADD_SUBDIRECTORY(pvr)
258
259####################################################
260#
261# Device integration plugins
262#
263IF   (SDL_FOUND)
264    ADD_SUBDIRECTORY(sdl)
265ENDIF(SDL_FOUND)
266
267
268##########to get all the variables of Cmake
269#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
270#FOREACH(myvar ${MYVARS})
271#    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
272#        "${myvar} -->${${myvar}}<-\n"
273#    )
274#ENDFOREACH(myvar)
275
276
Note: See TracBrowser for help on using the browser.