forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
592 lines (479 loc) · 24.7 KB
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
from conans import CMake, ConanFile, tools
from conans.model.version import Version
import glob, os
class ConanFile(ConanFile):
name = "openscenegraph"
description = "OpenSceneGraph is an open source high performance 3D graphics toolkit"
topics = "conan", "openscenegraph", "graphics"
url = "https://github.com/conan-io/conan-center-index"
homepage = "http://www.openscenegraph.org"
license = "LGPL-2.1-only", "WxWindows-exception-3.1"
settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
"fPIC": [True, False],
"build_applications": [True, False],
"build_examples": [True, False],
"enable_notify": [True, False],
"enable_deprecated_api": [True, False],
"enable_readfile": [True, False],
"enable_ref_ptr_implicit_output_conversion": [True, False],
"enable_ref_ptr_safe_dereference": [True, False],
"enable_envvar_support": [True, False],
"enable_windowing_system": [True, False],
"enable_deprecated_serializers": [True, False],
"use_fontconfig": [True, False],
# "with_asio": [True, False], # osg seems to not work with recent versions of asio
# "with_collada": [True, False],
"with_curl": [True, False],
"with_dcmtk": [True, False],
"with_freetype": [True, False],
"with_gdal": [True, False],
"with_gif": [True, False],
# "with_gstreamer": [True, False],
"with_gta": [True, False],
"with_jasper": [True, False],
"with_jpeg": [True, False],
"with_openexr": [True, False],
"with_png": [True, False],
"with_tiff": [True, False],
"with_zlib": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"build_applications": False,
"build_examples": False,
"enable_notify": True,
"enable_deprecated_api": False,
"enable_readfile": True,
"enable_ref_ptr_implicit_output_conversion": True,
"enable_ref_ptr_safe_dereference": True,
"enable_envvar_support": True,
"enable_windowing_system": True,
"enable_deprecated_serializers": False,
"use_fontconfig": True,
# "with_asio": False,
# "with_collada": False,
"with_curl": False,
"with_dcmtk": False,
"with_freetype": True,
"with_gdal": False,
"with_gif": True,
# "with_gstreamer": False,
"with_gta": False,
"with_jasper": False,
"with_jpeg": True,
"with_openexr": False,
"with_png": True,
"with_tiff": True,
"with_zlib": True,
}
short_paths = True
no_copy_source = True
exports_sources = "CMakeLists.txt",
generators = "cmake", "cmake_find_package_multi"
_source_subfolder = "source_subfolder"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
# del self.options.with_asio
# Default to false with fontconfig until it is supported on Windows
self.options.use_fontconfig = False
if tools.is_apple_os(self.settings.os):
# osg uses native apis on Apple platforms
del self.options.with_gif
del self.options.with_jpeg
del self.options.with_png
def configure(self):
if self.options.with_openexr:
self.options.with_zlib = True
if self.options.get_safe("with_png"):
self.options.with_zlib = True
if self.options.with_dcmtk:
self.options.with_zlib = True
# These are due to limitations in osg's plugin configuration, which can only be
# controlled via completely disabling cmake's find package mechanism per package
if not self.options.with_png:
self.options["dcmtk"].with_libpng = False
if not self.options.with_tiff:
self.options["dcmtk"].with_libtiff = False
if self.options.shared and self.settings.compiler == "Visual Studio":
# osg expects its dependencies to be shared libraries if it is being built as one
# this only really matters with msvc due to dllimport/export
# This could probably be fixed with minimal patching and the cmake_find_package
# generator, however that is currently horribly broken due to #2311
self.options["*"].shared = True
def requirements(self):
if self.options.enable_windowing_system and self.settings.os == "Linux":
self.requires("xorg/system")
self.requires("opengl/system")
if self.options.use_fontconfig:
self.requires("fontconfig/2.13.91")
# if self.options.get_safe("with_asio"):
# Should these be private requires?
# self.requires("asio/1.17.0")
# self.requires("boost/1.74.0")
# if self.options.with_collada:
# self.requires("libxml2/2.9.10")
if self.options.with_curl:
self.requires("libcurl/7.71.1")
if self.options.with_dcmtk:
self.requires("dcmtk/3.6.5")
if self.options.with_freetype:
self.requires("freetype/2.10.2")
if self.options.with_gdal:
self.requires("gdal/3.1.0")
if self.options.get_safe("with_gif"):
self.requires("giflib/5.2.1")
# if self.options.with_gstreamer:
# self.requires("glib/2.65.1")
if self.options.with_gta:
self.requires("libgta/1.2.1")
if self.options.with_jasper:
self.requires("jasper/2.0.16")
if self.options.get_safe("with_jpeg"):
self.requires("libjpeg/9d")
if self.options.with_openexr:
self.requires("openexr/2.5.2")
if self.options.get_safe("with_png"):
self.requires("libpng/1.6.37")
if self.options.with_tiff:
self.requires("libtiff/4.1.0")
if self.options.with_zlib:
self.requires("zlib/1.2.11")
def source(self):
tools.get(**self.conan_data["sources"][self.version])
os.rename("OpenSceneGraph-OpenSceneGraph-" + self.version, self._source_subfolder)
def build(self):
cmake = CMake(self)
cmake.definitions["DYNAMIC_OPENSCENEGRAPH"] = self.options.shared
cmake.definitions["DYNAMIC_OPENTHREADS"] = self.options.shared
cmake.definitions["BUILD_OSG_APPLICATIONS"] = self.options.build_applications
cmake.definitions["BUILD_OSG_EXAMPLES"] = self.options.build_examples
cmake.definitions["OSG_NOTIFY_DISABLED"] = not self.options.enable_notify
cmake.definitions["OSG_USE_DEPRECATED_API"] = self.options.enable_deprecated_api
cmake.definitions["OSG_PROVIDE_READFILE"] = self.options.enable_readfile
cmake.definitions["OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION"] = self.options.enable_ref_ptr_implicit_output_conversion
cmake.definitions["OSG_USE_REF_PTR_SAFE_DEREFERENCE"] = self.options.enable_ref_ptr_safe_dereference
cmake.definitions["OSG_ENVVAR_SUPPORTED"] = self.options.enable_envvar_support
if not self.options.enable_windowing_system:
cmake.definitions["OSG_WINDOWING_SYSTEM"] = None
cmake.definitions["BUILD_OSG_DEPRECATED_SERIALIZERS"] = self.options.enable_deprecated_serializers
cmake.definitions["OSG_TEXT_USE_FONTCONFIG"] = self.options.use_fontconfig
# Disable option dependencies unless we have a package for them
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_Freetype"] = not self.options.with_freetype
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_ilmbase"] = not self.options.with_openexr
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_Inventor"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_Jasper"] = not self.options.with_jasper
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_OpenEXR"] = not self.options.with_openexr
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_OpenCascade"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_COLLADA"] = True # not self.options.with_collada
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_FBX"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_ZLIB"] = not self.options.with_zlib
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GDAL"] = not self.options.with_gdal
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GTA"] = not self.options.with_gta
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = not self.options.with_curl
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_LibVNCServer"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_DCMTK"] = not self.options.with_dcmtk
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_FFmpeg"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GStreamer"] = True # not self.options.with_gstreamer
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GLIB"] = True # not self.options.with_gstreamer
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_DirectShow"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_SDL2"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_SDL"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_Poppler-glib"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_RSVG"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GtkGl"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_DirectInput"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_NVTT"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_Asio"] = True # not self.options.get_safe("with_asio")
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_ZeroConf"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_LIBLAS"] = True
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_GIFLIB"] = not self.options.get_safe("with_gif")
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_JPEG"] = not self.options.get_safe("with_jpeg")
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_PNG"] = not self.options.get_safe("with_png")
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = not self.options.with_tiff
if self.settings.os == "Windows":
# osg has optional quicktime support on Windows
cmake.definitions["CMAKE_DISABLE_FIND_PACKAGE_QuickTime"] = True
cmake.definitions["OSG_MSVC_VERSIONED_DLL"] = False
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
self.copy(pattern="LICENSE.txt", dst="licenses", src=self._source_subfolder)
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
def package_info(self):
# FindOpenSceneGraph is shipped with cmake and is a traditional cmake script
# It doesn't setup targets and only provides a few variables:
# - OPENSCENEGRAPH_FOUND
# - OPENSCENEGRAPH_VERSION
# - OPENSCENEGRAPH_INCLUDE_DIRS
# - OPENSCENEGRAPH_LIBRARIES
# Unfortunately, the cmake_find_package generators don't currently allow directly setting variables,
# but it will set the last three of these if the name of the package is OPENSCENEGRAPH (it uses
# the filename for the first, so OpenSceneGraph_FOUND gets set, not OPENSCENEGRAPH_FOUND)
self.cpp_info.filenames["cmake_find_package"] = "OpenSceneGraph"
self.cpp_info.filenames["cmake_find_package_multi"] = "OpenSceneGraph"
self.cpp_info.names["cmake_find_package"] = "OPENSCENEGRAPH"
self.cpp_info.names["cmake_find_package_multi"] = "OPENSCENEGRAPH"
if self.settings.build_type == "Debug":
postfix = "d"
elif self.settings.build_type == "RelWithDebInfo":
postfix = "rd"
elif self.settings.build_type == "MinSizeRel":
postfix = "s"
else:
postfix = ""
def setup_plugin(plugin):
lib = "osgdb_" + plugin
self.cpp_info.components[lib].libs = [] if self.options.shared else [lib + postfix]
self.cpp_info.components[lib].requires = ["OpenThreads", "osg", "osgDB", "osgUtil"]
if not self.options.shared:
self.cpp_info.components[lib].libdirs = [os.path.join("lib", "osgPlugins-{}".format(self.version))]
return lib
def setup_serializers(lib):
plugins = []
if lib not in ("osgDB", "osgWidget", "osgPresentation"):
plugins.append("serializers_{}".format(lib.lower()))
if self.options.enable_deprecated_serializers:
if lib not in ("osgUtil", "osgDB", "osgGA", "osgManipulator", "osgUI", "osgPresentation"):
plugins.append("deprecated_{}".format(lib.lower()))
for plugin in plugins:
plugin_lib = setup_plugin(plugin)
self.cpp_info.components[plugin_lib].requires.append(lib)
def setup_library(lib):
self.cpp_info.components[lib].libs = [lib + postfix]
self.cpp_info.components[lib].names["cmake_find_package"] = lib
self.cpp_info.components[lib].filenames["cmake_find_package"] = lib
setup_serializers(lib)
# Core libraries
# requires obtained from osg's source code
self.cpp_info.components["OpenThreads"].libs = ["OpenThreads" + postfix]
self.cpp_info.components["OpenThreads"].names["cmake_find_package"] = "OpenThreads"
self.cpp_info.components["OpenThreads"].names["pkg_config"] = "openthreads"
if self.settings.os == "Linux":
self.cpp_info.components["OpenThreads"].system_libs = ["pthread"]
setup_library("osg")
self.cpp_info.components["osg"].requires = ["OpenThreads", "opengl::opengl"]
if self.settings.os == "Linux":
self.cpp_info.components["osg"].system_libs = ["m", "rt", "dl"]
if not self.options.shared:
self.cpp_info.components["osg"].defines.append("OSG_LIBRARY_STATIC")
setup_library("osgDB")
self.cpp_info.components["osgDB"].requires = ["osg", "osgUtil", "OpenThreads"]
if self.settings.os == "Linux":
self.cpp_info.components["osgDB"].system_libs = ["dl"]
elif tools.is_apple_os(self.settings.os):
self.cpp_info.components["osgDB"].system_libs = ["Cocoa"]
if self.options.with_zlib:
self.cpp_info.components["osgDB"].requires.append("zlib::zlib")
setup_library("osgUtil")
self.cpp_info.components["osgUtil"].requires = ["osg", "OpenThreads"]
setup_library("osgGA")
self.cpp_info.components["osgGA"].requires = ["osgDB", "osgUtil", "osg", "OpenThreads"]
setup_library("osgText")
self.cpp_info.components["osgText"].requires = ["osgDB", "osg", "osgUtil", "OpenThreads"]
if self.options.use_fontconfig:
self.cpp_info.components["osgText"].requires.append("fontconfig::fontconfig")
setup_library("osgViewer")
self.cpp_info.components["osgViewer"].requires = ["osgGA", "osgText", "osgDB", "osgUtil", "osg"]
if self.options.enable_windowing_system:
if self.settings.os == "Linux":
self.cpp_info.components["osgViewer"].requires.append("xorg::xorg")
elif tools.is_apple_os(self.settings.os):
self.cpp_info.components["osgViewer"].system_libraries = ["Cocoa"]
if self.settings.os == "Windows":
self.cpp_info.components["osgViewer"].system_libraries = ["gdi32"]
setup_library("osgAnimation")
self.cpp_info.components["osgAnimation"].requires = ["osg", "osgText", "osgGA", "osgViewer", "OpenThreads"]
setup_library("osgFX")
self.cpp_info.components["osgFX"].requires = ["osgUtil", "osgDB", "osg", "OpenThreads"]
setup_library("osgManipulator")
self.cpp_info.components["osgManipulator"].requires = ["osgViewer", "osgGA", "osgUtil", "osg", "OpenThreads"]
setup_library("osgParticle")
self.cpp_info.components["osgParticle"].requires = ["osgUtil", "osgDB", "osg", "OpenThreads"]
setup_library("osgUI")
self.cpp_info.components["osgUI"].requires = ["osgDB", "osgGA", "osgUtil", "osgText", "osgViewer", "osg", "OpenThreads"]
setup_library("osgVolume")
self.cpp_info.components["osgVolume"].requires = ["osgGA", "osgDB", "osgUtil", "osg", "OpenThreads"]
setup_library("osgShadow")
self.cpp_info.components["osgShadow"].requires = ["osgUtil", "osgDB", "osg", "OpenThreads"]
setup_library("osgSim")
self.cpp_info.components["osgSim"].requires = ["osgText", "osgUtil", "osgDB", "osg", "OpenThreads"]
setup_library("osgTerrain")
self.cpp_info.components["osgTerrain"].requires = ["osgUtil", "osgDB", "osg", "OpenThreads"]
setup_library("osgWidget")
self.cpp_info.components["osgWidget"].requires = ["osgText", "osgViewer", "osgDB", "osg", "OpenThreads"]
setup_library("osgPresentation")
self.cpp_info.components["osgPresentation"].requires = ["osgViewer", "osgUI", "osgWidget", "osgManipulator", "osgVolume", "osgFX", "osgText", "osgGA", "osgUtil", "osgDB", "osg", "OpenThreads"]
# NodeKit/Psudo loader plugins
setup_plugin("osga")
setup_plugin("rot")
setup_plugin("scale")
setup_plugin("trans")
setup_plugin("normals")
setup_plugin("revisions")
plugin = setup_plugin("osgviewer")
self.cpp_info.components[plugin].requires.append("osgViewer")
plugin = setup_plugin("osgshadow")
self.cpp_info.components[plugin].requires.append("osgShadow")
plugin = setup_plugin("osgterrain")
self.cpp_info.components[plugin].requires.append("osgTerrain")
# Main native plugins
setup_plugin("osg")
plugin = setup_plugin("ive")
self.cpp_info.components[plugin].requires.extend(("osgSim", "osgFX", "osgText", "osgTerrain", "osgVolume"))
if self.options.with_zlib:
self.cpp_info.components[plugin].requires.append("zlib::zlib")
# Viewer plugins
plugin = setup_plugin("cfg")
self.cpp_info.components[plugin].requires.append("osgViewer")
# Shader plugins
setup_plugin("glsl")
# Image plugins
setup_plugin("rgb")
setup_plugin("bmp")
setup_plugin("pnm")
setup_plugin("dds")
setup_plugin("tga")
setup_plugin("hdr")
setup_plugin("dot")
setup_plugin("vtf")
setup_plugin("ktx")
if self.options.get_safe("with_jpeg"):
plugin = setup_plugin("jpeg")
self.cpp_info.components[plugin].requires.append("libjpeg::libjpeg")
if self.options.with_jasper:
plugin = setup_plugin("jp2")
self.cpp_info.components[plugin].requires.append("jasper::jasper")
if self.options.with_openexr:
plugin = setup_plugin("exr")
self.cpp_info.components[plugin].requires.append("openexr::openexr")
if self.options.get_safe("with_gif"):
plugin = setup_plugin("gif")
self.cpp_info.components[plugin].requires.append("giflib::giflib")
if self.options.get_safe("with_png"):
plugin = setup_plugin("png")
self.cpp_info.components[plugin].requires.extend(("libpng::libpng", "zlib::zlib"))
if self.options.with_tiff:
plugin = setup_plugin("tiff")
self.cpp_info.components[plugin].requires.append("libtiff::libtiff")
if self.options.with_gdal:
plugin = setup_plugin("gdal")
self.cpp_info.components[plugin].requires.extend(("osgTerrain", "gdal::gdal"))
plugin = setup_plugin("ogr")
self.cpp_info.components[plugin].requires.append("gdal::gdal")
if self.options.with_gta:
plugin = setup_plugin("gta")
self.cpp_info.components[plugin].requires.append("libgta::libgta")
# 3D Image plugins
if self.options.with_dcmtk:
plugin = setup_plugin("dicom")
self.cpp_info.components[plugin].requires.extend(("osgVolume", "dcmtk::dcmtk"))
if self.settings.os == "Windows":
self.cpp_info.components[plugin].system_libs = ["wsock32", "ws2_32"]
# 3rd party 3d plugins
setup_plugin("3dc")
plugin = setup_plugin("p3d")
self.cpp_info.components[plugin].requires.extend(("osgGA", "osgText", "osgVolume", "osgFX", "osgViewer", "osgPresentation"))
if self.options.with_curl:
plugin = setup_plugin("curl")
self.cpp_info.components[plugin].requires.append("libcurl::libcurl")
if self.options.with_zlib:
self.cpp_info.components[plugin].requires.append("zlib::zlib")
if self.options.with_zlib:
plugin = setup_plugin("gz")
self.cpp_info.components[plugin].requires.append("zlib::zlib")
# with_inventor
# setup_plugin("iv")
# with_collada
# setup_plugin("dae")
# with_fbx
# setup_plugin("fbx")
# with_opencascade
# setup_plugin("opencascade")
plugin = setup_plugin("bvh")
self.cpp_info.components[plugin].requires.append("osgAnimation")
setup_plugin("x")
plugin = setup_plugin("dxf")
self.cpp_info.components[plugin].requires.append("osgText")
plugin = setup_plugin("openflight")
self.cpp_info.components[plugin].requires.append("osgSim")
setup_plugin("obj")
setup_plugin("pic")
setup_plugin("stl")
setup_plugin("3ds")
setup_plugin("ac")
setup_plugin("pov")
setup_plugin("logo")
setup_plugin("lws")
setup_plugin("md2")
setup_plugin("osgtgz")
setup_plugin("tgz")
plugin = setup_plugin("shp")
self.cpp_info.components[plugin].requires.extend(("osgSim", "osgTerrain"))
plugin = setup_plugin("txf")
self.cpp_info.components[plugin].requires.append("osgText")
setup_plugin("bsp")
setup_plugin("mdl")
plugin = setup_plugin("gles")
self.cpp_info.components[plugin].requires.extend(("osgUtil", "osgAnimation"))
plugin = setup_plugin("osgjs")
self.cpp_info.components[plugin].requires.extend(("osgAnimation", "osgSim"))
plugin = setup_plugin("lwo")
self.cpp_info.components[plugin].requires.append("osgFX")
setup_plugin("ply")
plugin = setup_plugin("txp")
self.cpp_info.components[plugin].requires.extend(("osgSim", "osgText"))
# with_ffmpeg
# setup_plugin("ffmpeg")
# with_gstreamer
# setup_plugin("gstreamer")
# with_directshow
# setup_plugin("directshow")
if tools.is_apple_os(self.settings.os):
setup_plugin("imageio")
if (self.settings.os == "Macos" and Version(self.settings.os.version) >= "10.8") or (self.settings.os == "iOS" and Version(self.settings.os.version) >= "6.0"):
plugin = setup_plugin("avfoundation")
self.cpp_info.components[plugin].requires.append("osgViewer")
self.cpp_info.components[plugin].system_libs = ["AVFoundation", "Cocoa", "CoreVideo", "CoreMedia", "QuartzCore"]
if self.settings.os == "Macos" and Version(self.settings.os.version) <= "10.6" and self.settings.arch == "x86":
plugin = setup_plugin("qt")
self.cpp_info.components[plugin].system_libs = ["QuickTime"]
if self.settings.os == "Macos" and self.settings.arch == "x86":
plugin = setup_plugin("QTKit")
self.cpp_info.components[plugin].requires.append("osgViewer")
self.cpp_info.components[plugin].system_libs = ["QTKit", "Cocoa", "QuickTime", "CoreVideo"]
# with_nvtt
# setup_plugin("nvtt")
if self.options.with_freetype:
plugin = setup_plugin("freetype")
self.cpp_info.components[plugin].requires.extend(("osgText", "freetype::freetype"))
if self.options.with_zlib:
setup_plugin("zip")
# with_svg
# setup_plugin("svg")
# with_pdf/poppler
# setup_plugin("pdf")
# with_vnc
# setup_plugin("vnc")
setup_plugin("pvr")
plugin = setup_plugin("osc")
self.cpp_info.components[plugin].requires.append("osgGA")
if self.settings.os == "Windows":
self.cpp_info.components[plugin].system_libs = ["ws2_32", "winmm"]
setup_plugin("trk")
setup_plugin("tf")
# with_blas
# setup_plugin("las")
setup_plugin("lua")
# with_sdl
# setup_plugin("sdl")
# if self.options.get_safe("with_asio"):
# plugin = setup_plugin("resthttp")
# self.cpp_info.components[plugin].requires.extend(("osgPresentation", "asio::asio", "boost::boost"))
# with_zeroconf
# setup_plugin("zeroconf")