forked from vossg/OpenSGDevMaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
2067 lines (1553 loc) · 69.3 KB
/
CMakeLists.txt
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(OpenSG)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OpenSG_SOURCE_DIR}/CMake")
INCLUDE(OpenSGVersion)
##############################################
# Initial cache to make life easier on Windows
##############################################
IF(NOT _OSGINITCACHELOADED AND EXISTS ${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt AND NOT OSG_BUILD_DEPENDEND)
INCLUDE(${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt)
SET(_OSGINITCACHELOADED TRUE CACHE INTERNAL "")
ENDIF(NOT _OSGINITCACHELOADED AND EXISTS ${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt AND NOT OSG_BUILD_DEPENDEND)
INCLUDE(BuildFunctions)
##########################
# Disallow in-source build
##########################
IF("${OpenSG_SOURCE_DIR}" STREQUAL "${OpenSG_BINARY_DIR}")
MESSAGE(FATAL_ERROR "OpenSG requires an out of source Build. \n"
"Please create a separate binary directory and run "
"CMake there.")
ENDIF("${OpenSG_SOURCE_DIR}" STREQUAL "${OpenSG_BINARY_DIR}")
SET(OSG_BUILD_ACTIVE TRUE)
##############################################################################
# BUILD OPTIONS
##############################################################################
IF(NOT WIN32)
IF(OSG_BUILD_DEPENDEND)
# Hide it from further manipulation
SET(OSG_BUILD_DEPENDEND ${OSG_BUILD_DEPENDEND} CACHE INTERNAL "")
ENDIF(OSG_BUILD_DEPENDEND)
ENDIF(NOT WIN32)
OPTION(OSG_VERBOSE_BUILD_MESSAGES "Print verbose messages when generating the build system" OFF)
MARK_AS_ADVANCED(OSG_VERBOSE_BUILD_MESSAGES)
OSG_OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON)
OSG_OPTION(OSGBUILD_TESTS "Build test programs" ON)
OSG_OPTION(OSGBUILD_UNITTESTS "Build/run unit test programs" OFF)
OSG_OPTION(OSGBUILD_EXAMPLES_SIMPLE "Build example programs during system build" OFF)
OSG_OPTION(OSGBUILD_EXAMPLES_ADVANCED "Build advanced example programs during system build" OFF)
OSG_OPTION(OSGBUILD_PYTHON_BINDINGS "Build python bindings" OFF)
OSG_OPTION(OSGBUILD_PYTHON_DUMP_DECLS "Dump decls while building python" FALSE)
OSG_OPTION(OSGEXCLUDE_TESTS_FROM_ALL "Exclude test programs from all target" OFF)
OSG_OPTION(OSGEXCLUDE_UNITTESTS_FROM_ALL "Build/run unit test programs" OFF)
OSG_OPTION(OSGEXCLUDE_EXAMPLES_SIMPLE_FROM_ALL "Build example programs during system build" OFF)
OSG_OPTION(OSGEXCLUDE_EXAMPLES_ADVANCED_FROM_ALL "Build advanced example programs during system build" OFF)
OSG_OPTION(OSGBUILD_ENABLE_PACKAGING "Generate binary packages with CPack" OFF)
SET(OSGBUILD_PACKAGE_TYPE "" CACHE STRING
"The type of package to generate (empty->default)")
OSG_OPTION(OSG_ENABLE_NEW_SHADER "" ON)
OSG_OPTION(OSG_ENABLE_OGL2_SHADERFUNCTIONS "" ON)
OSG_OPTION(OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS "" OFF)
OSG_OPTION(OSG_ENABLE_OGL_COREONLY "" OFF)
OSG_OPTION(OSG_ENABLE_OGL_ES2 "" OFF)
OSG_OPTION(OSG_ENABLE_OGL_ES2_SIMGL3 "" OFF)
OSG_OPTION(OSG_ENABLE_OGL3_PROTOS "" OFF)
OSG_OPTION(OSG_ENABLE_OGL4_PROTOS "" OFF)
OSG_OPTION(OSG_ENABLE_OGLES_PROTOS "" OFF)
OSG_SET_CACHE(OSG_SHADER_CACHE_MODE 5 STRING "")
OSG_OPTION(OSG_ENABLE_FCD2CODE "" OFF)
OSG_OPTION(OSG_FCD2CODE_WRITE_CLASS "Write class file during cmake run if only
the fcd file is found" OFF)
OSG_OPTION(OSG_ENABLE_SCANPARSE_REGEN "" OFF)
OSG_OPTION(OSG_ENABLE_GLDEFINE_MAPPER "" ON)
OSG_OPTION(OSG_ENABLE_NEW_OSB_IO "" ON)
OSG_OPTION(OSG_ENABLE_SSE2 "" ON)
OSG_OPTION(OSG_ENABLE_TESTCONTAINER "" OFF)
OSG_OPTION(OSG_ENABLE_VALGRIND_CHECKS "" OFF)
OSG_OPTION(OSG_ENABLE_MEMORY_DEBUGGING "" OFF)
OSG_OPTION(OSG_ENABLE_DOUBLE_MATRIX_STACK "" OFF)
OSG_OPTION(OSG_ENABLE_DEFAULT_READONLY_CHANGELIST "" OFF)
OSG_OPTION(OSG_ENABLE_PAR_PARTITION_DRAWING "" OFF)
OSG_OPTION(OSG_DISABLE_SOURCE_GROUPS "" OFF)
OSG_OPTION(OSG_ENABLE_WRITE_PYTHON_TO_SOURCE "" OFF)
OSG_SET_CACHE(OSG_PYTHON_MODULE_BASE_DIR "" PATH "")
IF(WIN32)
OPTION(OSG_ENABLE_WIN_LOCALSTORAGE "" ON)
OPTION(OSG_DISABLE_MICROSOFT_SECURE_CXXX "" OFF)
IF(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
OPTION(OSG_DISABLE_MS_ITERATOR_DEBUGGING "" ON)
ELSE(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
OPTION(OSG_DISABLE_MS_ITERATOR_DEBUGGING "" OFF)
ENDIF(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
ELSEIF(APPLE)
OPTION(OSG_ENABLE_ELF_LOCALSTORAGE "" OFF)
ELSEIF(UNIX)
OPTION(OSG_ENABLE_ELF_LOCALSTORAGE "" ON)
ENDIF()
OPTION(OSG_ENABLE_AUTOINIT_THREADS "" OFF)
IF(WIN32)
OSG_OPTION(OSG_USE_SEPARATE_LIBDIRS "" ON)
OSG_OPTION(OSG_INSTALL_PDB_FILES "" OFF)
ENDIF(WIN32)
OSG_OPTION(OSG_INSTALL_EXAMPLES "" OFF)
OSG_OPTION(OSG_INSTALL_APPS "" ON)
OSG_OPTION(OSGCOMPAT_ENABLE "" OFF)
OSG_OPTION(OSGCOMPAT_ENABLE_DEPRECATED "" OFF)
OSG_OPTION(OSGCOMPAT_ENABLE_DEPRECATED_PROPS "" OFF)
OSG_SET_CACHE(OSG_RENDERPROPERTY_BITS 64 STRING "")
OSG_SET_CACHE(OSG_RENDERPROPERTY_UNIQUE_BITS 16 STRING "")
OSG_OPTION(OSG_GENERATE_SEPARATE_LIB_DOC "Generate separate doxygen documentation for contrib libraries" OFF)
OSG_OPTION(OSG_INSTALL_DOXYDOC "Install Doxygen documentation" OFF)
SET(OSG_DOXY_DOC_TYPE "User" CACHE STRING
"The type of documentation to generate (User, Developer, Trac)")
SET(OSG_DOXY_INPUTS CACHE FILEPATH "include given file instead of autogen")
SET(OSG_DOXY_STDOUT_LOG CACHE FILEPATH "log std to file")
# Not sure
#OPTION(OSG_ENABLE_MTCPTR "" ON)
#OPTION(OSG_ENABLE_GIF "" ON)
## prep options for OSGConfigured.h
IF(NOT OSGCOMPAT_ENABLE_DEPRECATED)
SET(OSG_DISABLE_DEPRECATED 1)
ENDIF(NOT OSGCOMPAT_ENABLE_DEPRECATED)
IF(OSG_ENABLE_SSE2)
SET(OSG_SIMD_SSE 1)
ENDIF(OSG_ENABLE_SSE2)
IF(OSG_ENABLE_NEW_OSB_IO)
SET(OSG_NEW_OSB_IO 1)
ENDIF(OSG_ENABLE_NEW_OSB_IO)
IF(OSG_ENABLE_GLDEFINE_MAPPER)
SET(OSG_GL_DEFMAPPER 1)
ENDIF(OSG_ENABLE_GLDEFINE_MAPPER)
IF(OSG_ENABLE_OGL2_SHADERFUNCTIONS)
SET(OSG_OGL2_SHADERFUNCS 1)
ENDIF(OSG_ENABLE_OGL2_SHADERFUNCTIONS)
IF(OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS)
SET(OSG_OGL_VERTEXATTRIB_FUNCS 1)
ENDIF(OSG_ENABLE_OGL_VERTEXATTRIB_FUNCS)
IF(OSG_ENABLE_OGL_COREONLY)
SET(OSG_OGL_COREONLY 1)
ENDIF(OSG_ENABLE_OGL_COREONLY)
IF(OSG_ENABLE_OGL_ES2)
SET(OSG_OGL_ES2 1)
SET(OSG_OGL_NO_DOUBLE 1)
ENDIF(OSG_ENABLE_OGL_ES2)
IF(OSG_ENABLE_OGLES_PROTOS)
SET(OSG_USE_OGLES_PROTOS 1)
SET(GL_GLEXT_PROTOTYPES 1)
ENDIF(OSG_ENABLE_OGLES_PROTOS)
IF(OSG_ENABLE_OGL3_PROTOS)
SET(GL_GLEXT_PROTOTYPES 1)
SET(GL3_PROTOTYPES 1)
SET(OSG_USE_OGL3_PROTOS 1)
ENDIF(OSG_ENABLE_OGL3_PROTOS)
IF(OSG_ENABLE_OGL4_PROTOS)
SET(GL_GLEXT_PROTOTYPES 1)
SET(GL3_PROTOTYPES 1)
SET(OSG_USE_OGL3_PROTOS 1)
SET(OSG_USE_OGL4_PROTOS 1)
ENDIF(OSG_ENABLE_OGL4_PROTOS)
IF(OSG_ENABLE_OGL_ES2_SIMGL3)
SET(OSG_OGL_ES2_SIMGL3 1)
ENDIF(OSG_ENABLE_OGL_ES2_SIMGL3)
IF(OSG_ENABLE_NEW_SHADER)
SET(OSG_NEW_SHADER 1)
ENDIF(OSG_ENABLE_NEW_SHADER)
IF(OSGCOMPAT_ENABLE)
SET(OSG_1_COMPAT 1)
ENDIF(OSGCOMPAT_ENABLE)
IF(NOT OSG_ENABLE_SCANPARSE_REGEN)
SET(OSG_PREBUILD_SCANPARSE 1)
ENDIF(NOT OSG_ENABLE_SCANPARSE_REGEN)
IF(OSG_ENABLE_ELF_LOCALSTORAGE)
SET(OSG_PTHREAD_ELF_TLS 1)
ENDIF(OSG_ENABLE_ELF_LOCALSTORAGE)
IF(OSG_ENABLE_WIN_LOCALSTORAGE)
SET(OSG_WIN32_ASPECT_USE_LOCALSTORAGE 1)
ENDIF(OSG_ENABLE_WIN_LOCALSTORAGE)
IF(OSGCOMPAT_ENABLE_DEPRECATED_PROPS)
SET(OSG_DEPRECATED_PROPS 1)
ENDIF(OSGCOMPAT_ENABLE_DEPRECATED_PROPS)
SET(OSG_SHC_MODE_${OSG_SHADER_CACHE_MODE} 1)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
INCLUDE(ConfigurePackages)
LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "")
IF(OSGEXCLUDE_TESTS_FROM_ALL)
SET(OSGEXCLUDE_TESTS EXCLUDE_FROM_ALL)
ELSE()
SET(OSGEXCLUDE_TESTS "")
ENDIF()
IF(OSGEXCLUDE_UNITTESTS_FROM_ALL)
SET(OSGEXCLUDE_UNITTESTS EXCLUDE_FROM_ALL)
ELSE()
SET(OSGEXCLUDE_UNITTESTS "")
ENDIF()
IF(OSGEXCLUDE_EXAMPLES_SIMPLE_FROM_ALL)
SET(OSGEXCLUDE_EXAMPLES_SIMPLE EXCLUDE_FROM_ALL)
ELSE()
SET(OSGEXCLUDE_EXAMPLES_SIMPLE "")
ENDIF()
IF(OSGEXCLUDE_EXAMPLES_ADVANCED_FROM_ALL)
SET(OSGEXCLUDE_EXAMPLES_ADVANCED EXCLUDE_FROM_ALL)
ELSE()
SET(OSGEXCLUDE_EXAMPLES_ADVANCED "")
ENDIF()
#####################
# External extensions
#####################
FOREACH(EXTERNAL ${OSG_EXTRA_EXTERNAL_MODULES})
OPTION(OSGBUILD_${EXTERNAL}
"Build using ${EXTERNAL} module" OFF)
IF(OSGBUILD_${EXTERNAL})
FIND_PATH(OSG_${EXTERNAL}_SOURCE_DIR
CMakeLists.Lib.${EXTERNAL}.txt
${CMAKE_CURRENT_SOURCE_DIR}/../${EXTERNAL})
OSG_ADD_OPT(OSG_${EXTERNAL}_SOURCE_DIR)
IF(NOT EXISTS
${OSG_${EXTERNAL}_SOURCE_DIR}/CMakeLists.Lib.${EXTERNAL}.txt)
MESSAGE(SEND_ERROR "Cannot find ${EXTERNAL} sources directory: "
"${OSG_${EXTERNAL}_SOURCE_DIR}")
ELSE()
LIST(APPEND OSG_EXTERNAL_CONFIGS "${EXTERNAL}")
ENDIF()
ENDIF()
ENDFOREACH(EXTERNAL)
OSG_SET_CACHE(OSG_EXTRA_EXTERNAL_MODULES "" STRING
"Extra modules that OpenSG will try to import.")
OSG_SET_CACHE(OSG_IGNORE_INSTALL "" STRING
"Extra modules that OpenSG will build but not installed.")
OSG_OPTION(OSG_LINK_EXTERNAL_MODULES_TO_CSM "" FALSE)
##############
# Compiler
##############
SET(OSG_PLATFORM_64 0)
SET(OSG_PLATFORM_32 0)
SET(OSG_APPLE64 0)
SET(OSG_APPLE32 0)
SET(OSG_LIBDIR_SUFFIX "")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(OSG_PLATFORM_64 1)
SET(OSG_LIBDIR_SUFFIX "64")
IF(NOT WIN32)
SET(OSG_LIBDIR_BASE_SUFFIX "64")
ENDIF(NOT WIN32)
IF(APPLE)
SET(OSG_APPLE64 1)
ENDIF(APPLE)
ELSE()
SET(OSG_PLATFORM_32 1)
IF(APPLE)
SET(OSG_APPLE32 1)
ENDIF(APPLE)
ENDIF()
IF(${CMAKE_CXX_PLATFORM_ID} STREQUAL "Linux")
SET(LINUX 1)
ENDIF()
IF(NOT WIN32 AND NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: Debug Release."
FORCE)
ENDIF(NOT WIN32 AND NOT CMAKE_BUILD_TYPE)
IF(NOT WIN32)
IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND
NOT CMAKE_BUILD_TYPE STREQUAL "DebugGV" AND
NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND
NOT CMAKE_BUILD_TYPE STREQUAL "ReleaseGV" AND
NOT CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
MESSAGE(FATAL_ERROR "incorrect build type ${CMAKE_BUILD_TYPE}.\n"
"Please use either Release or Debug")
ENDIF()
ELSEIF(NOT MSVC_IDE)
IF(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
SET(CMAKE_BUILD_TYPE DebugOpt CACHE STRING
"Choose the type of build, options are: ${CMAKE_CONFIGURATION_TYPES}."
FORCE)
ENDIF()
IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND
NOT CMAKE_BUILD_TYPE STREQUAL "DebugOpt" AND
NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND
NOT CMAKE_BUILD_TYPE STREQUAL "ReleaseNoOpt")
MESSAGE(FATAL_ERROR "incorrect build type ${CMAKE_BUILD_TYPE}.\n"
"Please use on of ${CMAKE_CONFIGURATION_TYPES}")
ENDIF()
ENDIF()
IF(NOT OSG_COMPILER_DEFAULTS)
INCLUDE(CMake/SetupCompiler.cmake)
SET( OSG_COMPILER_DEFAULTS 1 CACHE INTERNAL "Defaults written" FORCE ) #INTERNAL
ENDIF(NOT OSG_COMPILER_DEFAULTS)
INCLUDE(CMake/UpdateCompiler.cmake)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
CMAKE_BUILD_TYPE STREQUAL "DebugGV")
SET(OSG_LIBDIR_SUFFIX "${OSG_LIBDIR_SUFFIX}/debug")
SET(OSG_LIBDIR_BUILD_TYPE_SUFFIX "debug")
ENDIF()
ADD_DEFINITIONS(-D OSG_BUILD_ACTIVE)
OSG_CHECK_INSTALL()
##############################################################################
# DEPENDENCIES
##############################################################################
# Global include/library dirs, libs and definitions
SET(OSG_GLOBAL_DEP_INCDIR "")
SET(OSG_GLOBAL_DEP_LIBDIR "")
SET(OSG_GLOBAL_DEP_LIBS "")
SET(OSG_GLOBAL_DEP_DEFS "")
#IF(WIN32)
OSG_OPTION(OSG_USE_OSGSUPPORT_LIBS "" OFF)
OSG_OPTION(OSG_USE_STATIC_SUPPORT_LIBS "" OFF)
IF(OSG_USE_OSGSUPPORT_LIBS)
OSG_SET_CACHE(OSG_SUPPORT_ROOT "" PATH "")
ENDIF(OSG_USE_OSGSUPPORT_LIBS)
IF(EXISTS "${OSG_SUPPORT_ROOT}" AND
EXISTS "${OSG_SUPPORT_ROOT}/include/OSGSupportConfig.cmake")
INCLUDE("${OSG_SUPPORT_ROOT}/include/OSGSupportConfig.cmake")
SET(_OSG_FATAL_DMS_COMBO FALSE)
SET(_OSG_FATAL_ITER_COMBO FALSE)
IF( NOT OSG_DISABLE_MICROSOFT_SECURE_CXXX AND OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX)
SET(_OSG_FATAL_DMS_COMBO TRUE)
ENDIF()
IF( OSG_DISABLE_MICROSOFT_SECURE_CXXX AND NOT OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX)
SET(_OSG_FATAL_DMS_COMBO TRUE)
ENDIF()
IF(_OSG_FATAL_DMS_COMBO)
MESSAGE(FATAL_ERROR "Conflicting DISABLE_MS_SECURE settings:\n"
" Support : ${OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX}\n"
" OpenSG : ${OSG_DISABLE_MICROSOFT_SECURE_CXXX}")
ENDIF()
IF( NOT OSG_DISABLE_MS_ITERATOR_DEBUGGING AND OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING)
SET(_OSG_FATAL_ITER_COMBO TRUE)
ENDIF()
IF( OSG_DISABLE_MS_ITERATOR_DEBUGGING AND NOT OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING)
SET(_OSG_FATAL_ITER_COMBO TRUE)
ENDIF()
IF(_OSG_FATAL_ITER_COMBO)
MESSAGE(FATAL_ERROR "Conflicting DISABLE_MS_ITER_DEBUG settings:\n"
" Support : ${OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING}\n"
" OpenSG : ${OSG_DISABLE_MS_ITERATOR_DEBUGGING}")
ENDIF()
ENDIF()
IF(WIN32)
SET(OSG_INSTALL_SUBDIR "" CACHE STRING "add subdir to installed libs")
ENDIF(WIN32)
IF(NOT OSG_BUILD_DEPENDEND)
##########
#### boost
##########
OSG_CONFIGURE_BOOST()
#########
#### zlib
#########
OSG_CONFIGURE_ZLIB()
# MESSAGE(STATUS "zlib: ${ZLIB_FOUND}")
IF(UNIX AND NOT OSG_APPLE32)
#############
#### Freetype
#############
FIND_PACKAGE(Freetype)
IF(FREETYPE_FOUND)
OSG_SET(OSG_WITH_FT2 1)
FIND_LIBRARY(FONTCONFIG_LIBRARY NAMES fontconfig)
IF(FONTCONFIG_LIBRARY MATCHES "fontconfig")
OSG_SET(OSG_WITH_FONTCONFIG 1)
ENDIF()
ENDIF(FREETYPE_FOUND)
OSG_ADD_OPT(FREETYPE_FOUND)
OSG_ADD_OPT(FREETYPE_INCLUDE_DIR_freetype2)
OSG_ADD_OPT(FREETYPE_INCLUDE_DIR_ft2build)
OSG_ADD_OPT(FONTCONFIG_LIBRARY)
OSG_ADD_OPT(FREETYPE_LIBRARIES)
ENDIF(UNIX AND NOT OSG_APPLE32)
##############
#### ImageLibs
##############
OSG_CONFIGURE_TIFF()
OSG_CONFIGURE_PNG()
OSG_CONFIGURE_JPEG()
OSG_CONFIGURE_GDAL()
OSG_CONFIGURE_OPENEXR()
SET(OSG_EXTERNAL_IMAGELIBS)
SET(OSG_EXTERNAL_IMAGEINCS)
# MESSAGE(STATUS "tiff: ${TIFF_FOUND} - png ${PNG_FOUND} - jpg: ${JPEG_FOUND} - exr ${OPENEXR_FOUND}")
IF(TIFF_FOUND)
SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} TIFF_LIBRARIES)
SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} TIFF_INCLUDE_DIR)
OSG_SET(OSG_WITH_TIF 1)
OSG_ADD_OPT(TIFF_LIBRARIES)
ENDIF(TIFF_FOUND)
IF(PNG_FOUND)
SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} PNG_LIBRARIES)
SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} PNG_INCLUDE_DIR)
OSG_SET(OSG_WITH_PNG 1)
OSG_ADD_OPT(PNG_LIBRARIES)
ENDIF(PNG_FOUND)
IF(JPEG_FOUND)
SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} JPEG_LIBRARIES)
SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} JPEG_INCLUDE_DIR)
OSG_SET(OSG_WITH_JPG 1)
OSG_ADD_OPT(JPEG_LIBRARIES)
ENDIF(JPEG_FOUND)
IF(GDAL_FOUND)
SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} GDAL_LIBRARIES)
SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} GDAL_INCLUDE_DIR)
OSG_SET(OSG_WITH_GDAL 1)
OSG_ADD_OPT(GDAL_LIBRARIES)
ENDIF(GDAL_FOUND)
IF(OPENEXR_FOUND)
SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} OPENEXR_LIBRARIES)
SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} OPENEXR_INCLUDE_DIR)
OSG_SET(OSG_WITH_IMF 1)
OSG_ADD_OPT(OPENEXR_LIBRARIES)
OSG_ADD_OPT(OPENEXR_INCLUDE_DIR)
ENDIF(OPENEXR_FOUND)
OSG_ADD_OPT(OSG_EXTERNAL_IMAGELIBS)
OSG_ADD_OPT(OSG_EXTERNAL_IMAGEINCS)
#############
#### Collada
#############
#FIND_PACKAGE(Collada)
OSG_CONFIGURE_COLLADA()
IF(COLLADA_FOUND)
OSG_SET(OSG_WITH_COLLADA 1)
IF(NOT WIN32)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
CMAKE_BUILD_TYPE STREQUAL "DebugOpt")
OSG_SET(OSG_COLLADA_LIBS ${COLLADA_LIBRARY_DEBUG})
ELSE()
OSG_SET(OSG_COLLADA_LIBS ${COLLADA_LIBRARY_RELEASE})
ENDIF()
ENDIF(NOT WIN32)
OSG_ADD_OPT(COLLADA_DAE_INCLUDE_DIR)
OSG_ADD_OPT(COLLADA_DOM_INCLUDE_DIR)
IF(WIN32 OR COLLADA_TARGET_FOUND)
SET(OSG_COLLADA_LIBS ${OSG_COLLADA_TARGETS})
ENDIF(WIN32 OR COLLADA_TARGET_FOUND)
ELSE(COLLADA_FOUND)
SET(OSG_COLLADA_LIBS "")
ENDIF(COLLADA_FOUND)
OSG_ADD_OPT(COLLADA_FOUND)
#############
#### GLUT
#############
OSG_CONFIGURE_GLUT()
IF(GLUT_FOUND)
OSG_SET(OSG_WITH_GLUT 1)
OSG_SET(OSG_GLUT_INC_DIR ${GLUT_INCLUDE_DIR})
OSG_SET(OSG_GLUT_LIBS ${GLUT_LIBRARIES})
ELSE(GLUT_FOUND)
OSG_SET(OSG_WITH_GLUT 0)
OSG_SET(OSG_GLUT_INC_DIR "")
OSG_SET(OSG_GLUT_LIBS "")
ENDIF(GLUT_FOUND)
#############
#### QT
#############
OSG_FIND_PACKAGE(Qt4)
IF(QT4_FOUND)
OSG_SET(OSG_WITH_QT 1)
OSG_SET(OSG_QT4_INC_DIR ${QT_INCLUDE_DIR})
OSG_SET(OSG_QT4_LIBS ${QT_LIBRARY_DIR})
ELSE(QT4_FOUND)
OSG_SET(OSG_QT4_INC_DIR "")
OSG_SET(OSG_QT4_LIBS "")
ENDIF(QT4_FOUND)
OSG_ADD_OPT(QT_QTCORE_LIBRARY)
OSG_ADD_OPT(QT_QTGUI_LIBRARY)
OSG_ADD_OPT(QT_QTOPENGL_LIBRARY)
#############
#### OpenGL
#############
FIND_PACKAGE(OpenGL REQUIRED)
FIND_PACKAGE(GLU REQUIRED)
OSG_ADD_OPT(OPENGL_gl_LIBRARY)
OSG_ADD_OPT(OPENGL_glu_LIBRARY)
#############
#### X11
#############
FIND_PACKAGE(X11)
IF(X11_FOUND)
OSG_SET(OSG_X_LIBS ${X11_X11_LIB})
OSG_SET(OSG_X_INC_DIR ${X11_X11_INCLUDE_PATH})
ENDIF(X11_FOUND)
OSG_ADD_OPT(X11_FOUND)
#############
#### VTK
#############
IF(OSG_USE_OSG_VTK_SETUP)
OSG_CONFIGURE_VTK()
ELSE(OSG_USE_OSG_VTK_SETUP)
FIND_PACKAGE(VTK)
IF(VTK_FOUND)
OSG_SET(OSG_WITH_VTK 1)
OSG_SET(OSG_VTK_LIBS vtkRendering)
OSG_ADD_OPT(OSG_VTK_LIBS)
OSG_ADD_OPT(VTK_LIBRARY_DIRS)
OSG_ADD_OPT(VTK_INCLUDE_DIRS)
OSG_ADD_OPT(VTK_DIR)
ENDIF(VTK_FOUND)
ENDIF(OSG_USE_OSG_VTK_SETUP)
OSG_ADD_OPT(VTK_FOUND)
##############
#### GLEW
##############
IF(WIN32)
OSG_CONFIGURE_GLEW()
ENDIF(WIN32)
##############
#### Mini
##############
OSG_CONFIGURE_LIBMINI()
OSG_ADD_OPT(OSG_LIBMINI_FOUND)
OSG_ADD_OPT(OSG_LIBMINI_INCLUDE_DIR)
OSG_ADD_OPT(OSG_LIBMINI_LIBRARIES)
###############
#### OpenNurbs
###############
OSG_CONFIGURE_OPENNURBS()
OSG_ADD_OPT(OPENNURBS_FOUND)
OSG_ADD_OPT(OPENNURBS_INCLUDE_DIR)
OSG_ADD_OPT(OPENNURBS_LIBRARIES)
#############
#### Python
#############
FIND_PACKAGE(PythonInterp)
FIND_PACKAGE(PythonLibs)
OSG_ADD_OPT(PYTHON_INCLUDE_PATH)
OSG_ADD_OPT(PYTHON_LIBRARY)
IF(Boost_FOUND AND PYTHONLIBS_FOUND)
FIND_PACKAGE(Boost COMPONENTS python)
IF(Boost_FOUND AND WIN32)
SET(OSG_BOOST_PYTHON_TARGETS )
OSG_ADD_IMPORT_LIB(OSG_BOOST_PYTHON_TARGETS Boost_PYTHON_LIBRARY)
SET(OSG_BOOST_PYTHON_LIBS ${OSG_BOOST_PYTHON_TARGETS})
ELSE(Boost_FOUND AND WIN32)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
CMAKE_BUILD_TYPE STREQUAL "DebugOpt")
SET(OSG_BOOST_PYTHON_LIBS ${Boost_PYTHON_LIBRARY_DEBUG})
ELSE()
SET(OSG_BOOST_PYTHON_LIBS ${Boost_PYTHON_LIBRARY_RELEASE})
ENDIF()
ENDIF(Boost_FOUND AND WIN32)
# We ignore if boost python fails, we catch that somewhere else
# so if we get here Boost_FOUND was true in the first place
SET(Boost_FOUND TRUE)
FIND_PACKAGE(GCCXML)
OSG_SET_CACHE(PYOSG_PYPLUSPLUS_DIR "" PATH "")
OSG_SET_CACHE(PYOSG_PYPLUSPLUS_GOODIES_DIR "" PATH "")
OSG_SET_CACHE(PYOSG_DIR "" PATH "")
ENDIF()
###############
#### Flex/Bison
###############
FIND_PROGRAM(FLEX_EXE flex)
FIND_PROGRAM(BISON_EXE bison)
OSG_ADD_OPT(FLEX_EXE)
OSG_ADD_OPT(BISON_EXE)
##############
#### NVPerfSDK
##############
OSG_FIND_PACKAGE(NVidiaPerfSDK)
IF(NVIDIAPERFSDK_FOUND)
OSG_SET(OSG_WITH_NVPERFSDK 1)
OSG_SET(OSG_NVPERFSDK_INC_DIR ${NVIDIAPERFSDK_INCLUDE_DIR})
OSG_SET(OSG_NVPERFSDK_LIBS ${NVIDIAPERFSDK_LIBRARIES})
ELSE(NVIDIAPERFSDK_FOUND)
OSG_SET(OSG_WITH_NVPERFSDK 0)
OSG_SET(OSG_NVPERFSDK_INC_DIR "")
OSG_SET(OSG_NVPERFSDK_LIBS "")
ENDIF(NVIDIAPERFSDK_FOUND)
#############
#### Support
#############
IF(UNIX)
FIND_LIBRARY(OSG_THREAD_LIB NAMES pthread)
FIND_LIBRARY(OSG_DL_LIB NAMES dl)
OSG_ADD_OPT(OSG_THREAD_LIB)
OSG_ADD_OPT(OSG_DL_LIB)
ENDIF(UNIX)
IF(APPLE)
FIND_LIBRARY(OSG_APPLICATIONSERVICES_FRAMEWORK NAMES ApplicationServices)
FIND_LIBRARY(OSG_CARBON_FRAMEWORK NAMES Carbon)
FIND_LIBRARY(OSG_COCOA_FRAMEWORK NAMES Cocoa)
ENDIF(APPLE)
OSG_ADD_OPT(CMAKE_INSTALL_PREFIX)
ENDIF(NOT OSG_BUILD_DEPENDEND)
FOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
IF(EXISTS ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
INCLUDE(${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
ENDIF(EXISTS
${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
ENDFOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
IF(OSG_GLOBAL_PREP AND EXISTS ${OSG_GLOBAL_PREP})
INCLUDE(${OSG_GLOBAL_PREP})
ENDIF(OSG_GLOBAL_PREP AND EXISTS ${OSG_GLOBAL_PREP})
IF(APPLE AND OSG_COCOA_FRAMEWORK)
OSG_SET(OSG_NATIVE_WINDOW OSGWindowCocoa)
ELSEIF(WIN32)
OSG_SET(OSG_NATIVE_WINDOW OSGWindowWIN32)
ELSEIF(UNIX AND X11_FOUND)
OSG_SET(OSG_NATIVE_WINDOW OSGWindowX)
ELSE()
OSG_SET(OSG_NATIVE_WINDOW "")
ENDIF()
###############
#### Doxygen
###############
IF(EXISTS "${OSG_SUPPORT_ROOT}/bin/doxygen" AND NOT DOXYGEN_EXECUTABLE)
SET(DOXYGEN_EXECUTABLE "${OSG_SUPPORT_ROOT}/bin/doxygen"
CACHE FILEPATH "doxygen executable (custom)" FORCE)
ENDIF()
FIND_PACKAGE(Doxygen)
##############################################################################
# Overrides if dependend
##############################################################################
IF(NOT WIN32)
IF(OSG_BUILD_DEPENDEND)
MESSAGE(STATUS "Load reference settings")
INCLUDE(${OSG_REFERENCE_DIR}/CMake.settings)
# Needed to get the correct vtk/boost settings
FIND_PACKAGE(VTK)
OSG_BOOST_DEP_SETUP()
ELSE(OSG_BUILD_DEPENDEND)
# OSG_WRITE_SETTINGS(${CMAKE_BINARY_DIR}/CMake.settings)
ENDIF(OSG_BUILD_DEPENDEND)
ENDIF(NOT WIN32)
##############################################################################
# MAIN BUILD STEPS
##############################################################################
# when adding passes, make sure to add a corresponding pass directory variable
# OSG_PASSDIR_${PASSNAME} - this variable may not be empty!
SET(OSG_CMAKE_PASSES "OSGCOLLECT" "OSGSETUP")
SET(OSG_PASSDIR_OSGCOLLECT "Collect")
SET(OSG_PASSDIR_OSGSETUP "Build")
ADD_CUSTOM_TARGET(OSGAll)
###############
# Clean
###############
FILE(GLOB OSG_OLD_BUILD_FILES "${CMAKE_BINARY_DIR}/*.cmake")
IF(OSG_OLD_BUILD_FILES)
FILE(REMOVE ${OSG_OLD_BUILD_FILES})
ENDIF(OSG_OLD_BUILD_FILES)
FILE(GLOB OSG_OLD_CONFIG_FILES "${CMAKE_BINARY_DIR}/bin/osg2-config.part*.tmp")
IF(OSG_OLD_CONFIG_FILES)
FILE(REMOVE ${OSG_OLD_CONFIG_FILES})
ENDIF(OSG_OLD_CONFIG_FILES)
###############
# Tests
###############
ADD_CUSTOM_TARGET(OSGAllApps)
ADD_DEPENDENCIES(OSGAll OSGAllApps)
# optional pass for test programs
IF(OSGBUILD_TESTS)
LIST(APPEND OSG_CMAKE_PASSES "OSGSETUPTEST")
SET(OSG_PASSDIR_OSGSETUPTEST "Test")
ADD_CUSTOM_TARGET(OSGAllTests)
ADD_DEPENDENCIES(OSGAll OSGAllTests)
ENDIF(OSGBUILD_TESTS)
###############
# UnitTests
###############
IF(OSGBUILD_UNITTESTS)
ENABLE_TESTING()
INCLUDE(CTest)
# optional pass for unittest programs
LIST(APPEND OSG_CMAKE_PASSES "OSGSETUPUNITTEST")
SET(OSG_PASSDIR_OSGSETUPUNITTEST "UnitTest")
ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/Tools/unittest-cpp"
"${OSG_PASSDIR_OSGSETUPUNITTEST}")
SET(OSG_UNITTEST_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/Tools/unittest-cpp/UnitTest++/src")
SET(OSG_UNITTEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/bin")
SET(OSG_UNITTEST_LIBRARY "UnitTest++")
ADD_CUSTOM_TARGET(OSGAllUnitTests)
ADD_DEPENDENCIES(OSGAll OSGAllUnitTests)
ENDIF(OSGBUILD_UNITTESTS)
###############
# Python
###############
# optional pass for test programs
IF(OSGBUILD_PYTHON_BINDINGS)
LIST(APPEND OSG_CMAKE_PASSES "OSGPYTHON")
SET(OSG_PASSDIR_OSGPYTHON "Python")
IF(EXISTS ${PYOSG_PYPLUSPLUS_DIR})
SET(OSG_HAS_PYOSG_PYPLUSPLUS_DIR "True")
ELSE()
SET(OSG_HAS_PYOSG_PYPLUSPLUS_DIR "False")
ENDIF()
IF(EXISTS ${PYOSG_PYPLUSPLUS_GOODIES_DIR})
SET(OSG_HAS_PYOSG_PYPLUSPLUS_GOODIES_DIR "True")
ELSE()
SET(OSG_HAS_PYOSG_PYPLUSPLUS_GOODIES_DIR "False")
ENDIF()
SET(OSG_CAN_REGEN_PYTHON_BINDINGS FALSE)
IF(GCCXML AND
PYOSG_DIR AND
PYOSG_PYPLUSPLUS_DIR AND
PYOSG_PYPLUSPLUS_GOODIES_DIR)
IF(EXISTS ${GCCXML} AND
EXISTS ${PYOSG_DIR} AND
EXISTS ${PYOSG_PYPLUSPLUS_DIR} AND
EXISTS ${PYOSG_PYPLUSPLUS_GOODIES_DIR})
SET(OSG_CAN_REGEN_PYTHON_BINDINGS TRUE)
ENDIF()
ENDIF()
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_SOURCE_DIR}/Bindings/Python/genLibOrder.py"
"${CMAKE_BINARY_DIR}/Python/Helper/genLibOrder.py")
FILE(WRITE "${CMAKE_BINARY_DIR}/Python/Helper/libOrder.py" "# Lib order information\n\n\nlibInfo = {}\n\n")
FILE(APPEND "${CMAKE_BINARY_DIR}/Python/Helper/libOrder.py" "fullLibInfo = {}\n\n")
IF(EXISTS ${PYOSG_DIR})
FILE(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/Python/Helper")
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${PYOSG_DIR}/src/osggen.py"
"${CMAKE_BINARY_DIR}/Python/Helper/osggen.py")
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_SOURCE_DIR}/Bindings/Python/splitGenHelper.py"
"${CMAKE_BINARY_DIR}/Python/Helper/splitGenHelper.py")
#########################
# settings.py
#########################
SET(_OSG_FILE_IN "${PYOSG_DIR}/src/settings.py")
SET(_OSG_FILE_OUT_PROC "${CMAKE_BINARY_DIR}/Python/Helper/processed/settings.py.proc")
SET(_OSG_FILE_OUT "${CMAKE_BINARY_DIR}/Python/Helper/settings.py")
SET(_OSG_PATCH_FILE "${CMAKE_SOURCE_DIR}/Bindings/Python/Patches/settings.py.patch")
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy
"${_OSG_FILE_IN}"
"${_OSG_FILE_OUT_PROC}")
EXECUTE_PROCESS(COMMAND "patch" "-p0"
INPUT_FILE "${_OSG_PATCH_FILE}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Python/Helper/processed")
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${_OSG_FILE_OUT_PROC}"
"${_OSG_FILE_OUT}")
#########################
# PreBoostPython.h
#########################
SET(_OSG_FILE_IN "${PYOSG_DIR}/src/osg_module/PreBoostPython.h")
SET(_OSG_FILE_OUT_PROC "${CMAKE_SOURCE_DIR}/Bindings/Python/Common/processed/PreBoostPython.h.proc")
SET(_OSG_FILE_OUT "${CMAKE_SOURCE_DIR}/Bindings/Python/Common/PreBoostPython.h")
FILE(READ ${_OSG_FILE_IN} _OSG_FILE_IN_DATA)
STRING(REPLACE "<OpenSG/"
"<" _OSG_FILE_IN_DATA_P1 "${_OSG_FILE_IN_DATA}")
FILE(WRITE ${_OSG_FILE_OUT_PROC} "${_OSG_FILE_IN_DATA_P1}")
EXECUTE_PROCESS(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${_OSG_FILE_OUT_PROC}"