1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
3 MESSAGE(STATUS "Running cmake version : ${CMAKE_VERSION}")
5 IF(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
6 CMAKE_POLICY(SET CMP0020 OLD) # behaviour change in linking qt
11 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OpenSG_SOURCE_DIR}/CMake")
14 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OpenSG_SOURCE_DIR}/CMake/IOS")
17 INCLUDE(OpenSGVersion)
19 # Disable boost cmake config, as it screws up OpenSG's boost config
21 SET(Boost_NO_BOOST_CMAKE TRUE CACHE INTERNAL "" FORCE)
24 SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
27 ##############################################
28 # Initial cache to make life easier on Windows
29 ##############################################
31 IF(NOT _OSGINITCACHELOADED AND EXISTS ${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt AND NOT OSG_BUILD_DEPENDEND)
32 GET_FILENAME_COMPONENT(_OSGTMPF "${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt" REALPATH)
33 GET_FILENAME_COMPONENT(_OSGTMP "${_OSGTMPF}" PATH)
35 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_OSGTMP}")
36 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_OSGTMP}/CMake")
39 SET(_OSGINITCACHELOADED TRUE CACHE INTERNAL "")
40 ENDIF(NOT _OSGINITCACHELOADED AND EXISTS ${CMAKE_SOURCE_DIR}/CMakeCacheInitial.txt AND NOT OSG_BUILD_DEPENDEND)
43 INCLUDE(OSGBuildFunctions)
45 ##########################
46 # Disallow in-source build
47 ##########################
49 IF("${OpenSG_SOURCE_DIR}" STREQUAL "${OpenSG_BINARY_DIR}")
50 MESSAGE(FATAL_ERROR "OpenSG requires an out of source Build. \n"
51 "Please create a separate binary directory and run "
53 ENDIF("${OpenSG_SOURCE_DIR}" STREQUAL "${OpenSG_BINARY_DIR}")
55 SET(OSG_BUILD_ACTIVE TRUE)
57 ##############################################################################
59 ##############################################################################
61 INCLUDE(OSGCommonOptions)
62 INCLUDE(OSGCommonConfig)
65 OSG_COMMON_OPTIONS_CONFIGURED()
66 OSG_COMMON_OPTIONS_DEPRECATED()
68 OPTION(OSG_VERBOSE_BUILD_MESSAGES
69 "Print verbose messages when generating the build system" OFF)
70 MARK_AS_ADVANCED(OSG_VERBOSE_BUILD_MESSAGES)
72 OSG_OPTION(OSGBUILD_TESTS "Build test programs" ON)
73 OSG_OPTION(OSGBUILD_UNITTESTS "Build/run unit test programs" OFF)
74 OSG_OPTION(OSGBUILD_EXAMPLES_SIMPLE "Build example programs during system build" OFF)
75 OSG_OPTION(OSGBUILD_EXAMPLES_ADVANCED "Build advanced example programs during system build" OFF)
76 OSG_OPTION(OSGBUILD_EXAMPLES_TUTORIAL "Build tutorial example programs during system build" OFF)
78 OSG_OPTION(OSGBUILD_PYTHON_BINDINGS "Build python bindings" OFF)
79 OSG_OPTION(OSGBUILD_PYTHON_DUMP_DECLS "Dump decls while building python" FALSE)
81 OSG_OPTION(OSGEXCLUDE_TESTS_FROM_ALL "Exclude test programs from all target" OFF)
82 OSG_OPTION(OSGEXCLUDE_UNITTESTS_FROM_ALL "Build/run unit test programs" OFF)
83 OSG_OPTION(OSGEXCLUDE_EXAMPLES_SIMPLE_FROM_ALL "Build example programs during system build" OFF)
84 OSG_OPTION(OSGEXCLUDE_EXAMPLES_ADVANCED_FROM_ALL "Build advanced example programs during system build" OFF)
85 OSG_OPTION(OSG_ENABLE_MULTISHADER_VARCHUNK "" OFF)
86 OSG_OPTION(OSG_ENABLE_OGL_COREONLY "" OFF)
87 OSG_OPTION(OSG_ENABLE_OGL_ES2 "" OFF)
88 OSG_OPTION(OSG_ENABLE_OGL_ES2_SIMGL3 "" OFF)
89 OSG_OPTION(OSG_ENABLE_CSM_WIN7_FEATURES "" OFF)
91 OSG_OPTION(OSG_ENABLE_OGL3_PROTOS "" OFF)
92 OSG_OPTION(OSG_ENABLE_OGL4_PROTOS "" OFF)
93 OSG_OPTION(OSG_ENABLE_OGLES_PROTOS "" OFF)
95 OSG_OPTION(OSG_ENABLE_GL_INCLUDE_GLEW "" OFF)
97 OSG_SET_CACHE(OSG_SHADER_CACHE_MODE 5 STRING "")
99 OSG_OPTION(OSG_ENABLE_FCD2CODE "" OFF)
100 OSG_OPTION(OSG_FCD2CODE_WRITE_CLASS "Write class file during cmake run if only
101 the fcd file is found" OFF)
102 OSG_OPTION(OSG_ENABLE_SCANPARSE_REGEN "" OFF)
104 OSG_OPTION(OSG_ENABLE_GLDEFINE_MAPPER "" ON)
105 OSG_OPTION(OSG_ENABLE_NEW_OSB_IO "" ON)
107 OSG_OPTION(OSG_ENABLE_SSE2 "" ON)
108 OSG_OPTION(OSG_USE_OSG2_NAMESPACE "" OFF)
109 OSG_OPTION(OSG_ENABLE_C++11 "" OFF)
111 OSG_OPTION(OSG_ENABLE_TESTCONTAINER "" OFF)
112 OSG_OPTION(OSG_ENABLE_VALGRIND_CHECKS "" OFF)
113 OSG_OPTION(OSG_ENABLE_MEMORY_DEBUGGING "" OFF)
114 OSG_OPTION(OSG_ENABLE_DOUBLE_MATRIX_STACK "" OFF)
115 OSG_OPTION(OSG_ENABLE_DEFAULT_READONLY_CHANGELIST "" OFF)
116 OSG_OPTION(OSG_DISABLE_SOURCE_GROUPS "" OFF)
117 OSG_OPTION(OSG_ENABLE_WRITE_PYTHON_TO_SOURCE "" OFF)
119 OSG_OPTION(OSG_ENABLE_CUDA "" OFF)
120 OSG_OPTION(OSG_ENABLE_VTK "" ON )
123 OPTION(OSG_ENABLE_WIN_LOCALSTORAGE "" ON)
124 OPTION(OSG_DISABLE_MICROSOFT_SECURE_CXXX "" OFF)
126 IF(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
127 OPTION(OSG_DISABLE_MS_ITERATOR_DEBUGGING "" ON)
128 ELSE(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
129 OPTION(OSG_DISABLE_MS_ITERATOR_DEBUGGING "" OFF)
130 ENDIF(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
132 OPTION(OSG_ENABLE_ELF_LOCALSTORAGE "" OFF)
134 OPTION(OSG_ENABLE_ELF_LOCALSTORAGE "" ON)
137 OSG_OPTION(OSG_ENABLE_AUTOINIT_THREADS "" OFF)
138 OPTION(OSG_DEPENDENT_INCLUDE_BUILD "" OFF)
141 OSG_OPTION(OSG_USE_SEPARATE_LIBDIRS "" ON)
142 OSG_OPTION(OSG_INSTALL_PDB_FILES "" OFF)
145 OSG_OPTION(OSG_INSTALL_EXAMPLES "" OFF)
146 OSG_OPTION(OSG_INSTALL_EXAMPLES_EXE "" OFF)
147 OSG_OPTION(OSG_INSTALL_APPS "" ON)
149 OSG_OPTION(OSGCOMPAT_ENABLE "" OFF)
150 OSG_OPTION(OSGCOMPAT_ENABLE_DEPRECATED "" OFF)
151 OSG_OPTION(OSGCOMPAT_ENABLE_DEPRECATED_PROPS "" OFF)
153 OSG_SET_CACHE(OSG_RENDERPROPERTY_BITS 64 STRING "")
154 OSG_SET_CACHE(OSG_RENDERPROPERTY_UNIQUE_BITS 16 STRING "")
156 OSG_OPTION(OSG_GENERATE_SEPARATE_LIB_DOC "Generate separate doxygen documentation for contrib libraries" OFF)
157 OSG_OPTION(OSG_INSTALL_DOXYDOC "Install Doxygen documentation" OFF)
159 OSG_OPTION(OSG_LINK_EXTERNAL_MODULES_TO_CSM "" FALSE)
162 #OSG_OPTION(OSGBUILD_ENABLE_PACKAGING "Generate binary packages with CPack" OFF)
163 #SET(OSGBUILD_PACKAGE_TYPE "" CACHE STRING
164 # "The type of package to generate (empty->default)")
167 SET(OSG_DOXY_DOC_TYPE "User" CACHE STRING
168 "The type of documentation to generate (User, Developer, Trac)")
169 SET(OSG_DOXY_INPUTS CACHE FILEPATH "include given file instead of autogen")
170 SET(OSG_DOXY_STDOUT_LOG CACHE FILEPATH "log std to file")
173 #OPTION(OSG_ENABLE_MTCPTR "" ON)
174 #OPTION(OSG_ENABLE_GIF "" ON)
176 ## prep options for OSGConfigured.h
178 IF(NOT OSGCOMPAT_ENABLE_DEPRECATED)
179 SET(OSG_DISABLE_DEPRECATED 1)
180 ENDIF(NOT OSGCOMPAT_ENABLE_DEPRECATED)
182 IF(OSG_USE_OSG2_NAMESPACE)
183 ADD_DEFINITIONS(-DOSG_USE_OSG2_NAMESPACE=1)
188 ENDIF(OSG_ENABLE_SSE2)
190 IF(OSG_ENABLE_NEW_OSB_IO)
191 SET(OSG_NEW_OSB_IO 1)
192 ENDIF(OSG_ENABLE_NEW_OSB_IO)
194 IF(OSG_ENABLE_GLDEFINE_MAPPER)
195 SET(OSG_GL_DEFMAPPER 1)
196 ENDIF(OSG_ENABLE_GLDEFINE_MAPPER)
198 IF(OSG_ENABLE_MULTISHADER_VARCHUNK)
199 SET(OSG_MULTISHADER_VARCHUNK 1)
200 ENDIF(OSG_ENABLE_MULTISHADER_VARCHUNK)
202 IF(OSG_ENABLE_OGL_COREONLY)
203 SET(OSG_OGL_COREONLY 1)
204 ENDIF(OSG_ENABLE_OGL_COREONLY)
206 IF(OSG_ENABLE_GL_INCLUDE_GLEW)
207 SET(OSG_GL_INCLUDE_GLEW 1)
208 ENDIF(OSG_ENABLE_GL_INCLUDE_GLEW)
210 IF(OSG_ENABLE_OGL_ES2)
212 SET(OSG_OGL_NO_DOUBLE 1)
213 ENDIF(OSG_ENABLE_OGL_ES2)
215 IF(OSG_ENABLE_OGLES_PROTOS)
216 SET(OSG_USE_OGLES_PROTOS 1)
217 SET(GL_GLEXT_PROTOTYPES 1)
218 ENDIF(OSG_ENABLE_OGLES_PROTOS)
220 IF(OSG_ENABLE_OGL3_PROTOS)
221 SET(GL_GLEXT_PROTOTYPES 1)
222 SET(GL3_PROTOTYPES 1)
223 SET(OSG_USE_OGL3_PROTOS 1)
224 ENDIF(OSG_ENABLE_OGL3_PROTOS)
226 IF(OSG_ENABLE_OGL4_PROTOS)
227 SET(GL_GLEXT_PROTOTYPES 1)
228 SET(GL3_PROTOTYPES 1)
229 SET(OSG_USE_OGL3_PROTOS 1)
230 SET(OSG_USE_OGL4_PROTOS 1)
231 ENDIF(OSG_ENABLE_OGL4_PROTOS)
233 IF(OSG_ENABLE_OGL_ES2_SIMGL3)
234 SET(OSG_OGL_ES2_SIMGL3 1)
235 ENDIF(OSG_ENABLE_OGL_ES2_SIMGL3)
239 ENDIF(OSGCOMPAT_ENABLE)
241 IF(NOT OSG_ENABLE_SCANPARSE_REGEN)
242 SET(OSG_PREBUILD_SCANPARSE 1)
243 ENDIF(NOT OSG_ENABLE_SCANPARSE_REGEN)
245 IF(OSG_ENABLE_ELF_LOCALSTORAGE)
246 SET(OSG_PTHREAD_ELF_TLS 1)
247 ENDIF(OSG_ENABLE_ELF_LOCALSTORAGE)
249 IF(OSG_ENABLE_WIN_LOCALSTORAGE)
250 SET(OSG_WIN32_ASPECT_USE_LOCALSTORAGE 1)
251 ENDIF(OSG_ENABLE_WIN_LOCALSTORAGE)
253 IF(OSGCOMPAT_ENABLE_DEPRECATED_PROPS)
254 SET(OSG_DEPRECATED_PROPS 1)
255 ENDIF(OSGCOMPAT_ENABLE_DEPRECATED_PROPS)
257 SET(OSG_SHC_MODE_${OSG_SHADER_CACHE_MODE} 1)
260 SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
261 SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
262 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
265 INCLUDE(OSGConfigurePackages)
267 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "")
269 IF(OSGEXCLUDE_TESTS_FROM_ALL)
270 SET(OSGEXCLUDE_TESTS EXCLUDE_FROM_ALL)
272 SET(OSGEXCLUDE_TESTS "")
275 IF(OSGEXCLUDE_UNITTESTS_FROM_ALL)
276 SET(OSGEXCLUDE_UNITTESTS EXCLUDE_FROM_ALL)
278 SET(OSGEXCLUDE_UNITTESTS "")
281 IF(OSGEXCLUDE_EXAMPLES_SIMPLE_FROM_ALL)
282 SET(OSGEXCLUDE_EXAMPLES_SIMPLE EXCLUDE_FROM_ALL)
284 SET(OSGEXCLUDE_EXAMPLES_SIMPLE "")
287 IF(OSGEXCLUDE_EXAMPLES_ADVANCED_FROM_ALL)
288 SET(OSGEXCLUDE_EXAMPLES_ADVANCED EXCLUDE_FROM_ALL)
290 SET(OSGEXCLUDE_EXAMPLES_ADVANCED "")
294 IF(OSG_BUILD_DEPENDEND)
295 INCLUDE(${OSG_REFERENCE_DIR}/CMake.global.settings)
296 IF(OSG_DEPENDENT_INCLUDE_BUILD)
297 INCLUDE(${OSG_REFERENCE_DIR}/CMake.build.settings)
302 #####################
303 # External extensions
304 #####################
306 OSG_SET_CACHE(OSG_EXTRA_EXTERNAL_MODULES "" STRING
307 "Extra modules that OpenSG will try to import.")
309 OSG_SET_CACHE(OSG_IGNORE_INSTALL "" STRING
310 "Extra modules that OpenSG will build but not installed.")
312 OSG_SET_CACHE(OSG_EXTERNAL_MODULES_INCLUDE "" FILEPATH
313 "Include file of extra modules")
315 IF(EXISTS "${OSG_EXTERNAL_MODULES_INCLUDE}")
316 INCLUDE("${OSG_EXTERNAL_MODULES_INCLUDE}")
319 FOREACH(EXTERNAL ${OSG_EXTRA_EXTERNAL_MODULES})
320 OPTION(OSGBUILD_${EXTERNAL}
321 "Build using ${EXTERNAL} module" OFF)
323 IF(OSGBUILD_${EXTERNAL})
324 FIND_PATH(OSG_${EXTERNAL}_SOURCE_DIR
325 CMakeLists.Lib.${EXTERNAL}.txt
326 ${CMAKE_CURRENT_SOURCE_DIR}/../${EXTERNAL})
328 OSG_ADD_OPT(OSG_${EXTERNAL}_SOURCE_DIR)
331 ${OSG_${EXTERNAL}_SOURCE_DIR}/CMakeLists.Lib.${EXTERNAL}.txt)
333 MESSAGE(SEND_ERROR "Cannot find ${EXTERNAL} sources directory: "
334 "${OSG_${EXTERNAL}_SOURCE_DIR}")
336 LIST(APPEND OSG_EXTERNAL_CONFIGS "${EXTERNAL}")
338 GET_FILENAME_COMPONENT(_EXT_SRC_DIR
339 "${OSG_${EXTERNAL}_SOURCE_DIR}/.."
342 IF(EXISTS "${OSG_${EXTERNAL}_SOURCE_DIR}/CMakeLists.PackagePrepare.cmake")
343 LIST(APPEND OSG_EXTERNAL_PREPARE "${OSG_${EXTERNAL}_SOURCE_DIR}")
346 IF(EXISTS "${_EXT_SRC_DIR}/CMakeLists.PackagePrepare.cmake")
347 LIST(APPEND OSG_EXTERNAL_PREPARE "${_EXT_SRC_DIR}")
353 IF(OSG_EXTERNAL_PREPARE)
354 LIST(REMOVE_DUPLICATES OSG_EXTERNAL_PREPARE)
361 SET(OSG_PLATFORM_64 0)
362 SET(OSG_PLATFORM_32 0)
365 SET(OSG_LIBDIR_SUFFIX "")
367 IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
368 SET(OSG_PLATFORM_64 1)
369 SET(OSG_LIBDIR_SUFFIX "64")
372 SET(OSG_LIBDIR_BASE_SUFFIX "64")
379 SET(OSG_PLATFORM_32 1)
387 IF(${CMAKE_CXX_PLATFORM_ID} STREQUAL "Linux")
392 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;DebugOpt;ReleaseNoOpt"
393 CACHE STRING "OpenSG Build Types" FORCE )
395 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;DebugGV"
396 CACHE STRING "OpenSG Build Types" FORCE )
399 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;Debug-iphonesimulator;Release-iphonesimulator;Debug-iphoneos;Release-iphoneos"
400 CACHE STRING "OpenSG Build Types" FORCE )
403 IF(NOT WIN32 AND NOT CMAKE_BUILD_TYPE)
404 SET(CMAKE_BUILD_TYPE Debug CACHE STRING
405 "Choose the type of build, options are: Debug Release."
407 ENDIF(NOT WIN32 AND NOT CMAKE_BUILD_TYPE)
410 IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND
411 NOT CMAKE_BUILD_TYPE STREQUAL "DebugGV" AND
412 NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND
413 NOT CMAKE_BUILD_TYPE STREQUAL "ReleaseGV" AND
414 NOT CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
416 MESSAGE(FATAL_ERROR "incorrect build type ${CMAKE_BUILD_TYPE}.\n"
417 "Please use either Release or Debug")
422 IF(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
423 SET(CMAKE_BUILD_TYPE DebugOpt CACHE STRING
424 "Choose the type of build, options are: ${CMAKE_CONFIGURATION_TYPES}."
428 IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND
429 NOT CMAKE_BUILD_TYPE STREQUAL "DebugOpt" AND
430 NOT CMAKE_BUILD_TYPE STREQUAL "Release" AND
431 NOT CMAKE_BUILD_TYPE STREQUAL "ReleaseNoOpt")
433 MESSAGE(FATAL_ERROR "incorrect build type ${CMAKE_BUILD_TYPE}.\n"
434 "Please use on of ${CMAKE_CONFIGURATION_TYPES}")
439 IF(NOT OSG_COMPILER_DEFAULTS)
440 INCLUDE(CMake/OSGSetupCompiler.cmake)
441 SET( OSG_COMPILER_DEFAULTS 1 CACHE INTERNAL "Defaults written" FORCE )
442 ENDIF(NOT OSG_COMPILER_DEFAULTS)
444 INCLUDE(CMake/OSGUpdateCompiler.cmake)
446 IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
447 CMAKE_BUILD_TYPE STREQUAL "DebugGV")
449 SET(OSG_LIBDIR_SUFFIX "${OSG_LIBDIR_SUFFIX}/debug")
450 SET(OSG_LIBDIR_BUILD_TYPE_SUFFIX "debug")
454 ADD_DEFINITIONS(-D OSG_BUILD_ACTIVE)
458 ##############################################################################
460 ##############################################################################
462 # Global include/library dirs, libs and definitions
463 SET(OSG_GLOBAL_DEP_INCDIR "")
464 SET(OSG_SYSTEM_DEP_INCDIR "")
465 SET(OSG_GLOBAL_DEP_LIBDIR "")
466 SET(OSG_GLOBAL_DEP_LIBS "")
467 SET(OSG_GLOBAL_DEP_DEFS "")
470 SET(OSG_SUPPORT_INC_SUBDIR "/OpenSG")
474 OSG_OPTION(OSG_USE_OSGSUPPORT_LIBS "" OFF)
475 OSG_OPTION(OSG_USE_STATIC_SUPPORT_LIBS "" OFF)
477 IF(OSG_USE_OSGSUPPORT_LIBS)
478 OSG_SET_CACHE(OSG_SUPPORT_ROOT "" PATH "")
479 ENDIF(OSG_USE_OSGSUPPORT_LIBS)
481 IF(EXISTS "${OSG_SUPPORT_ROOT}" AND
482 EXISTS "${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR}/OSGSupportConfig.cmake")
484 INCLUDE("${OSG_SUPPORT_ROOT}/include${OSG_SUPPORT_INC_SUBDIR}/OSGSupportConfig.cmake")
486 SET(_OSG_FATAL_DMS_COMBO FALSE)
487 SET(_OSG_FATAL_ITER_COMBO FALSE)
489 IF( NOT OSG_DISABLE_MICROSOFT_SECURE_CXXX AND OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX)
490 SET(_OSG_FATAL_DMS_COMBO TRUE)
493 IF( OSG_DISABLE_MICROSOFT_SECURE_CXXX AND NOT OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX)
494 SET(_OSG_FATAL_DMS_COMBO TRUE)
497 IF(_OSG_FATAL_DMS_COMBO)
499 MESSAGE(FATAL_ERROR "Conflicting DISABLE_MS_SECURE settings:\n"
500 " Support : ${OSG_SUPPORT_DISABLE_MICROSOFT_SECURE_CXXX}\n"
501 " OpenSG : ${OSG_DISABLE_MICROSOFT_SECURE_CXXX}")
506 IF( NOT OSG_DISABLE_MS_ITERATOR_DEBUGGING AND OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING)
507 SET(_OSG_FATAL_ITER_COMBO TRUE)
510 IF( OSG_DISABLE_MS_ITERATOR_DEBUGGING AND NOT OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING)
511 SET(_OSG_FATAL_ITER_COMBO TRUE)
514 IF(_OSG_FATAL_ITER_COMBO)
516 MESSAGE(FATAL_ERROR "Conflicting DISABLE_MS_ITER_DEBUG settings:\n"
517 " Support : ${OSG_SUPPORT_DISABLE_MS_ITERATOR_DEBUGGING}\n"
518 " OpenSG : ${OSG_DISABLE_MS_ITERATOR_DEBUGGING}")
524 SET(OSG_INSTALL_SUBDIR "" CACHE STRING "add subdir to installed libs")
527 IF(NOT OSG_BUILD_DEPENDEND)
533 OSG_CONFIGURE_BOOST()
541 # MESSAGE(STATUS "zlib: ${ZLIB_FOUND}")
543 IF(UNIX AND NOT OSG_APPLE32)
548 FIND_PACKAGE(Freetype)
551 OSG_SET(OSG_WITH_FT2 1)
553 FIND_LIBRARY(FONTCONFIG_LIBRARY NAMES fontconfig)
555 IF(FONTCONFIG_LIBRARY MATCHES "fontconfig")
556 OSG_SET(OSG_WITH_FONTCONFIG 1)
559 ENDIF(FREETYPE_FOUND)
561 OSG_ADD_OPT(FREETYPE_FOUND)
562 OSG_ADD_OPT(FREETYPE_INCLUDE_DIR_freetype2)
563 OSG_ADD_OPT(FREETYPE_INCLUDE_DIR_ft2build)
564 OSG_ADD_OPT(FONTCONFIG_LIBRARY)
565 OSG_ADD_OPT(FREETYPE_LIBRARIES)
566 ENDIF(UNIX AND NOT OSG_APPLE32)
576 OSG_CONFIGURE_OPENEXR()
578 SET(OSG_EXTERNAL_IMAGELIBS)
579 SET(OSG_EXTERNAL_IMAGEINCS)
581 # MESSAGE(STATUS "tiff: ${TIFF_FOUND} - png ${PNG_FOUND} - jpg: ${JPEG_FOUND} - exr ${OPENEXR_FOUND}")
584 SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} TIFF_LIBRARIES)
585 SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} TIFF_INCLUDE_DIR)
586 OSG_SET(OSG_WITH_TIF 1)
587 OSG_ADD_OPT(TIFF_LIBRARIES)
591 SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} PNG_LIBRARIES)
592 SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} PNG_INCLUDE_DIR)
593 OSG_SET(OSG_WITH_PNG 1)
594 OSG_ADD_OPT(PNG_INCLUDE_DIR)
595 OSG_ADD_OPT(PNG_LIBRARIES)
599 SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} JPEG_LIBRARIES)
600 SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} JPEG_INCLUDE_DIR)
601 OSG_SET(OSG_WITH_JPG 1)
602 OSG_ADD_OPT(JPEG_LIBRARIES)
606 SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} GDAL_LIBRARIES)
607 SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} GDAL_INCLUDE_DIR)
608 OSG_SET(OSG_WITH_GDAL 1)
609 OSG_ADD_OPT(GDAL_LIBRARIES)
613 SET(OSG_EXTERNAL_IMAGELIBS ${OSG_EXTERNAL_IMAGELIBS} OPENEXR_LIBRARIES)
614 SET(OSG_EXTERNAL_IMAGEINCS ${OSG_EXTERNAL_IMAGEINCS} OPENEXR_INCLUDE_DIR)
615 OSG_SET(OSG_WITH_IMF 1)
617 OSG_ADD_OPT(OPENEXR_LIBRARIES)
618 OSG_ADD_OPT(OPENEXR_INCLUDE_DIR)
622 OSG_ADD_OPT(OSG_EXTERNAL_IMAGELIBS)
623 OSG_ADD_OPT(OSG_EXTERNAL_IMAGEINCS)
629 #FIND_PACKAGE(Collada)
631 OSG_CONFIGURE_COLLADA()
635 OSG_SET(OSG_WITH_COLLADA 1)
638 IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
639 CMAKE_BUILD_TYPE STREQUAL "DebugOpt")
641 OSG_SET(OSG_COLLADA_LIBS ${COLLADA_LIBRARY_DEBUG})
645 OSG_SET(OSG_COLLADA_LIBS ${COLLADA_LIBRARY_RELEASE})
650 OSG_ADD_OPT(COLLADA_DAE_INCLUDE_DIR)
651 OSG_ADD_OPT(COLLADA_DOM_INCLUDE_DIR)
653 IF(WIN32 OR COLLADA_TARGET_FOUND)
654 SET(OSG_COLLADA_LIBS ${OSG_COLLADA_TARGETS})
655 ENDIF(WIN32 OR COLLADA_TARGET_FOUND)
659 SET(OSG_COLLADA_LIBS "")
663 OSG_ADD_OPT(COLLADA_FOUND)
672 OSG_SET(OSG_WITH_GLUT 1)
673 OSG_SET(OSG_GLUT_INC_DIR ${GLUT_INCLUDE_DIR})
674 OSG_SET(OSG_GLUT_LIBS ${GLUT_LIBRARIES})
676 OSG_SET(OSG_WITH_GLUT 0)
677 OSG_SET(OSG_GLUT_INC_DIR "")
678 OSG_SET(OSG_GLUT_LIBS "")
692 FIND_PACKAGE(OpenGLES REQUIRED)
694 OSG_ADD_OPT(OPENGL_gl_LIBRARY)
695 OSG_ADD_OPT(OPENGL_glu_LIBRARY)
697 FIND_PACKAGE(OpenGL REQUIRED)
699 OSG_ADD_OPT(OPENGL_gl_LIBRARY)
700 OSG_ADD_OPT(OPENGL_glu_LIBRARY)
703 IF(OSG_USE_OGL3_PROTOS OR OSG_USE_OGL4_PROTOS)
704 SET(OSG_OGL_INCDIRS ${CMAKE_SOURCE_DIR}/Source/External/OpenGL)
705 LIST(APPEND OSG_GLOBAL_DEP_INCDIR OSG_OGL_INCDIRS)
707 ADD_DEFINITIONS(-DOSG_USE_GL3_INCLUDES=1)
717 OSG_SET(OSG_X_LIBS ${X11_X11_LIB})
718 OSG_SET(OSG_X_INC_DIR ${X11_X11_INCLUDE_PATH})
721 OSG_ADD_OPT(X11_FOUND)
728 IF(OSG_USE_OSG_VTK_SETUP)
730 ELSE(OSG_USE_OSG_VTK_SETUP)
731 FIND_PACKAGE(VTK NO_MODULE)
734 OSG_SET(OSG_WITH_VTK 1)
736 INCLUDE(${VTK_USE_FILE})
737 OSG_SET(OSG_VTK_LIBS "${VTK_LIBRARIES}")
739 OSG_ADD_OPT(OSG_VTK_LIBS)
740 OSG_ADD_OPT(VTK_LIBRARY_DIRS)
741 OSG_ADD_OPT(VTK_INCLUDE_DIRS)
744 ENDIF(OSG_USE_OSG_VTK_SETUP)
746 OSG_ADD_OPT(VTK_FOUND)
753 IF(WIN32 OR OSG_ENABLE_GL_INCLUDE_GLEW)
756 IF(OSG_ENABLE_GL_INCLUDE_GLEW AND GLEW_FOUND)
757 LIST(APPEND OSG_GLOBAL_DEP_INCDIR GLEW_INCLUDE_DIR)
758 ENDIF(OSG_ENABLE_GL_INCLUDE_GLEW AND GLEW_FOUND)
760 ENDIF(WIN32 OR OSG_ENABLE_GL_INCLUDE_GLEW)
766 OSG_CONFIGURE_LIBMINI()
768 OSG_ADD_OPT(OSG_LIBMINI_FOUND)
769 OSG_ADD_OPT(OSG_LIBMINI_INCLUDE_DIR)
770 OSG_ADD_OPT(OSG_LIBMINI_LIBRARIES)
776 OSG_CONFIGURE_OPENNURBS()
778 OSG_ADD_OPT(OPENNURBS_FOUND)
779 OSG_ADD_OPT(OPENNURBS_INCLUDE_DIR)
780 OSG_ADD_OPT(OPENNURBS_LIBRARIES)
786 OSG_CONFIGURE_ANTTWEAKBAR()
788 OSG_ADD_OPT(OSG_ANTTWEAKBAR_FOUND)
789 OSG_ADD_OPT(OSG_ANTTWEAKBAR_INCLUDE_DIR)
790 OSG_ADD_OPT(OSG_ANTTWEAKBAR_LIBRARIES)
796 FIND_PACKAGE(PythonInterp)
797 FIND_PACKAGE(PythonLibs)
799 OSG_ADD_OPT(PYTHON_INCLUDE_PATH)
800 OSG_ADD_OPT(PYTHON_LIBRARY)
801 OSG_ADD_OPT(PYTHONLIBS_FOUND)
803 IF(Boost_FOUND AND PYTHONLIBS_FOUND)
805 FIND_PACKAGE(Boost COMPONENTS python)
807 IF(Boost_FOUND AND WIN32)
809 SET(OSG_BOOST_PYTHON_TARGETS )
810 OSG_ADD_IMPORT_LIB(OSG_BOOST_PYTHON_TARGETS Boost_PYTHON_LIBRARY)
811 SET(OSG_BOOST_PYTHON_LIBS ${OSG_BOOST_PYTHON_TARGETS})
813 ELSE(Boost_FOUND AND WIN32)
815 IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
816 CMAKE_BUILD_TYPE STREQUAL "DebugOpt")
818 SET(OSG_BOOST_PYTHON_LIBS ${Boost_PYTHON_LIBRARY_DEBUG})
821 SET(OSG_BOOST_PYTHON_LIBS ${Boost_PYTHON_LIBRARY_RELEASE})
824 ENDIF(Boost_FOUND AND WIN32)
826 # We ignore if boost python fails, we catch that somewhere else
827 # so if we get here Boost_FOUND was true in the first place
828 SET(Boost_FOUND TRUE)
832 OSG_SET_CACHE(PYOSG_PYPLUSPLUS_DIR "" PATH "")
833 OSG_SET_CACHE(PYOSG_PYPLUSPLUS_GOODIES_DIR "" PATH "")
834 OSG_SET_CACHE(PYOSG_DIR "" PATH "")
843 FIND_PROGRAM(FLEX_EXE flex)
844 FIND_PROGRAM(BISON_EXE bison)
846 OSG_ADD_OPT(FLEX_EXE)
847 OSG_ADD_OPT(BISON_EXE)
853 # OSG_FIND_PACKAGE(NVidiaPerfSDK)
855 # IF(NVIDIAPERFSDK_FOUND)
856 # OSG_SET(OSG_WITH_NVPERFSDK 1)
857 # OSG_SET(OSG_NVPERFSDK_INC_DIR ${NVIDIAPERFSDK_INCLUDE_DIR})
858 # OSG_SET(OSG_NVPERFSDK_LIBS ${NVIDIAPERFSDK_LIBRARIES})
859 # ELSE(NVIDIAPERFSDK_FOUND)
860 # OSG_SET(OSG_WITH_NVPERFSDK 0)
861 # OSG_SET(OSG_NVPERFSDK_INC_DIR "")
862 # OSG_SET(OSG_NVPERFSDK_LIBS "")
863 # ENDIF(NVIDIAPERFSDK_FOUND)
871 FIND_LIBRARY(OSG_THREAD_LIB NAMES pthread)
872 FIND_LIBRARY(OSG_DL_LIB NAMES dl)
873 FIND_LIBRARY(OSG_RT_LIB NAMES rt)
875 OSG_ADD_OPT(OSG_THREAD_LIB)
876 OSG_ADD_OPT(OSG_DL_LIB)
877 OSG_ADD_OPT(OSG_RT_LIB)
881 FIND_LIBRARY(OSG_APPLICATIONSERVICES_FRAMEWORK NAMES ApplicationServices)
882 FIND_LIBRARY(OSG_CORESERVICES_FRAMEWORK NAMES CoreServices)
883 FIND_LIBRARY(OSG_CARBON_FRAMEWORK NAMES Carbon)
884 FIND_LIBRARY(OSG_COCOA_FRAMEWORK NAMES Cocoa)
886 OSG_ADD_OPT(OSG_APPLICATIONSERVICES_FRAMEWORK)
887 OSG_ADD_OPT(OSG_CORESERVICES_FRAMEWORK)
888 OSG_ADD_OPT(OSG_CARBON_FRAMEWORK)
889 OSG_ADD_OPT(OSG_COCOA_FRAMEWORK)
892 OSG_ADD_OPT(CMAKE_INSTALL_PREFIX)
894 ENDIF(NOT OSG_BUILD_DEPENDEND)
899 FOREACH(EXTERNAL_PREPARE ${OSG_EXTERNAL_PREPARE})
900 INCLUDE("${EXTERNAL_PREPARE}/CMakeLists.PackagePrepare.cmake")
903 FOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
904 IF(EXISTS ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
905 INCLUDE(${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
907 ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Prepare.cmake)
908 ENDFOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
911 IF(OSG_GLOBAL_PREP AND EXISTS ${OSG_GLOBAL_PREP})
912 INCLUDE(${OSG_GLOBAL_PREP})
913 ENDIF(OSG_GLOBAL_PREP AND EXISTS ${OSG_GLOBAL_PREP})
915 IF(APPLE AND OSG_COCOA_FRAMEWORK)
916 OSG_SET(OSG_NATIVE_WINDOW OSGWindowCocoa)
918 OSG_SET(OSG_NATIVE_WINDOW OSGWindowWIN32)
919 ELSEIF(UNIX AND X11_FOUND)
920 OSG_SET(OSG_NATIVE_WINDOW OSGWindowX)
921 ELSEIF(APPLE AND IOS)
922 OSG_SET(OSG_NATIVE_WINDOW OSGWindowEAGL)
924 OSG_SET(OSG_NATIVE_WINDOW "")
931 IF(EXISTS "${OSG_SUPPORT_ROOT}/bin/doxygen" AND NOT DOXYGEN_EXECUTABLE)
932 SET(DOXYGEN_EXECUTABLE "${OSG_SUPPORT_ROOT}/bin/doxygen"
933 CACHE FILEPATH "doxygen executable (custom)" FORCE)
936 FIND_PACKAGE(Doxygen)
938 ##############################################################################
939 # Overrides if dependend
940 ##############################################################################
943 IF(OSG_BUILD_DEPENDEND)
944 MESSAGE(STATUS "Load reference settings")
945 INCLUDE(${OSG_REFERENCE_DIR}/CMake.settings)
946 # Needed to get the correct vtk/boost settings
948 OSG_BOOST_DEP_SETUP()
951 IF(OSG_ENABLE_GL_INCLUDE_GLEW AND GLEW_FOUND)
952 LIST(APPEND OSG_GLOBAL_DEP_INCDIR GLEW_INCLUDE_DIR)
953 ENDIF(OSG_ENABLE_GL_INCLUDE_GLEW AND GLEW_FOUND)
955 ELSE(OSG_BUILD_DEPENDEND)
956 # OSG_WRITE_SETTINGS(${CMAKE_BINARY_DIR}/CMake.settings)
957 ENDIF(OSG_BUILD_DEPENDEND)
960 ##############################################################################
962 ##############################################################################
964 # when adding passes, make sure to add a corresponding pass directory variable
965 # OSG_PASSDIR_${PASSNAME} - this variable may not be empty!
966 SET(OSG_CMAKE_PASSES "OSGCOLLECT" "OSGSETUP")
968 SET(OSG_PASSDIR_OSGCOLLECT "Collect")
969 SET(OSG_PASSDIR_OSGSETUP "Build")
977 FILE(GLOB OSG_OLD_BUILD_FILES "${CMAKE_BINARY_DIR}/*.cmake")
979 IF(OSG_OLD_BUILD_FILES)
980 FILE(REMOVE ${OSG_OLD_BUILD_FILES})
981 ENDIF(OSG_OLD_BUILD_FILES)
983 FILE(GLOB OSG_OLD_CONFIG_FILES "${CMAKE_BINARY_DIR}/bin/osg2-config.part*.tmp")
985 IF(OSG_OLD_CONFIG_FILES)
986 FILE(REMOVE ${OSG_OLD_CONFIG_FILES})
987 ENDIF(OSG_OLD_CONFIG_FILES)
993 # optional pass for test programs
995 LIST(APPEND OSG_CMAKE_PASSES "OSGSETUPTEST")
996 SET(OSG_PASSDIR_OSGSETUPTEST "Test")
997 ENDIF(OSGBUILD_TESTS)
1003 IF(OSGBUILD_UNITTESTS)
1007 # optional pass for unittest programs
1008 LIST(APPEND OSG_CMAKE_PASSES "OSGSETUPUNITTEST")
1009 SET(OSG_PASSDIR_OSGSETUPUNITTEST "UnitTest")
1011 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/Tools/unittest-cpp"
1012 "${OSG_PASSDIR_OSGSETUPUNITTEST}")
1014 SET(OSG_UNITTEST_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/Tools/unittest-cpp/UnitTest++/src")
1015 SET(OSG_UNITTEST_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/bin")
1016 SET(OSG_UNITTEST_LIBRARY "UnitTest++")
1018 ADD_CUSTOM_TARGET(OSGAllUnitTests)
1019 ADD_DEPENDENCIES(OSGAll OSGAllUnitTests)
1020 ENDIF(OSGBUILD_UNITTESTS)
1026 INCLUDE(OSGSetupPython)
1027 SETUP_PYTHON_BUILD()
1032 SET(OSG_DOXY_HTML_DIR "${CMAKE_BINARY_DIR}/Doc/html")
1033 FILE(MAKE_DIRECTORY ${OSG_DOXY_HTML_DIR})
1035 IF(OSG_GENERATE_SEPARATE_LIB_DOC)
1036 ADD_CUSTOM_TARGET(Doc)
1039 IF(DOXYGEN_EXECUTABLE)
1040 SET(DOXYGEN_VERSION)
1041 EXECUTE_PROCESS(COMMAND "${DOXYGEN_EXECUTABLE}" "--version"
1042 OUTPUT_VARIABLE DOXYGEN_VERSION
1043 OUTPUT_STRIP_TRAILING_WHITESPACE)
1044 IF(DOXYGEN_VERSION STREQUAL "1.7.3")
1045 MESSAGE(WARNING "Detected doxygen version 1.7.3, which is known to crash "
1046 "when building OpenSG documentation. "
1047 "Please use a different version, sorry for the inconvenience.")
1048 ENDIF(DOXYGEN_VERSION STREQUAL "1.7.3")
1049 ENDIF(DOXYGEN_EXECUTABLE)
1051 IF(NOT OSG_DOXY_INPUTS)
1052 # add a pass for doxygen to run
1053 LIST(APPEND OSG_CMAKE_PASSES "OSGDOXYDOC")
1054 SET(OSG_PASSDIR_OSGDOXYDOC "Doc/build")
1056 LIST(APPEND OSG_CMAKE_PASSES "OSGDOXYDOC_EXT")
1057 SET(OSG_PASSDIR_OSGDOXYDOC_EXT "DocExt/build")
1058 ENDIF(NOT OSG_DOXY_INPUTS)
1060 # set up variables for the config file
1061 IF(DOXYGEN_DOT_EXECUTABLE)
1062 SET(OSG_DOXY_HAVE_DOT "YES")
1063 ENDIF(DOXYGEN_DOT_EXECUTABLE)
1065 SET(OSG_DOXY_CONFIGURATION_FILE_IN "${CMAKE_SOURCE_DIR}/Doc/opensg-doxy.in")
1066 SET(OSG_DOXY_CONFIGURATION_FILE "${CMAKE_BINARY_DIR}/Doc/opensg-doxy")
1067 SET(OSG_GENDOXY_CONFIGURATION_FILE "${CMAKE_BINARY_DIR}/GenDoc/opensg-doxy")
1069 SET(OSG_DOXY_HTML_CSS "${CMAKE_SOURCE_DIR}/Doc/doxygen_osg.css")
1071 IF(OSG_DOXY_DOC_TYPE STREQUAL "User")
1072 SET(OSG_DOXY_FULL_PATH_NAMES "YES")
1073 SET(OSG_DOXY_STRIP_FROM_PATH "${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}")
1074 SET(OSG_DOXY_INTERNAL_DOCS "NO")
1075 SET(OSG_DOXY_STRIP_CODE_COMMENTS "YES")
1076 SET(OSG_DOXY_GENERATE_TREEVIEW "NO")
1077 SET(OSG_DOXY_SEARCHENGINE "NO")
1079 ELSEIF(OSG_DOXY_DOC_TYPE STREQUAL "Developer")
1080 SET(OSG_DOXY_FULL_PATH_NAMES "YES")
1081 SET(OSG_DOXY_STRIP_FROM_PATH "${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}")
1082 SET(OSG_DOXY_INTERNAL_DOCS "YES")
1083 SET(OSG_DOXY_STRIP_CODE_COMMENTS "NO")
1084 SET(OSG_DOXY_GENERATE_TREEVIEW "YES")
1085 SET(OSG_DOXY_SEARCHENGINE "NO")
1087 ELSEIF(OSG_DOXY_DOC_TYPE STREQUAL "Trac")
1088 SET(OSG_DOXY_FULL_PATH_NAMES "NO")
1089 SET(OSG_DOXY_INTERNAL_DOCS "NO")
1090 SET(OSG_DOXY_STRIP_CODE_COMMENTS "YES")
1091 SET(OSG_DOXY_HAVE_DOT "NO")
1092 SET(OSG_DOXY_GENERATE_TREEVIEW "NO")
1093 SET(OSG_DOXY_HTML_HEADER "${CMAKE_SOURCE_DIR}/Doc/TracHeader.html")
1094 SET(OSG_DOXY_HTML_FOOTER "${CMAKE_SOURCE_DIR}/Doc/TracFooter.html")
1095 SET(OSG_DOXY_SEARCHENGINE "NO")
1097 ENDIF(OSG_DOXY_DOC_TYPE STREQUAL "User")
1099 IF(NOT OSG_GENERATE_SEPARATE_LIB_DOC)
1100 SET(OSG_OpenSG_DOC_DIRECTORY "${CMAKE_BINARY_DIR}/Doc/html/Full")
1102 SET(OSG_OpenSG_DOC_DIRECTORY "${CMAKE_BINARY_DIR}/Doc/html/Glue")
1105 FILE(MAKE_DIRECTORY ${OSG_OpenSG_DOC_DIRECTORY})
1107 SET(OSG_DOC_BASIC_INPUT "${CMAKE_BINARY_DIR}/Doc/Include/OSGFullDoc.include")
1108 SET(OSG_DOC_GENERAL_INPUT "${CMAKE_BINARY_DIR}/Doc/Include/OSGGeneralDoc.include")
1110 IF(NOT OSG_GENERATE_SEPARATE_LIB_DOC)
1111 SET(OSG_DOC_SECTION "all_in_one")
1112 SET(OSG_${PROJECT_NAME}_DOXY_TAGFILE "${CMAKE_BINARY_DIR}/Doc/${PROJECT_NAME}_DOXYGEN_TAGS")
1114 SET(OSG_DOC_SECTION "separate")
1117 # write doxygen config file
1118 CONFIGURE_FILE("${OSG_DOXY_CONFIGURATION_FILE_IN}"
1119 "${OSG_DOXY_CONFIGURATION_FILE}")
1122 # write general doc config file
1124 SET(OSG_OpenSG_DOC_DIRECTORY "${CMAKE_BINARY_DIR}/GenDoc")
1125 SET(OSG_${PROJECT_NAME}_DOXY_TAGFILE "")
1126 #SET(OSG_${PROJECT_NAME}_DEP_DOXY_TAGFILES "${CMAKE_BINARY_DIR}/Doc/${PROJECT_NAME}_DOXYGEN_TAGS=${CMAKE_BINARY_DIR}/Doc/html/Full/html")
1128 SET(OSG_DOC_SECTION "${OSG_DOC_SECTION} include_general_doc")
1130 CONFIGURE_FILE("${OSG_DOXY_CONFIGURATION_FILE_IN}"
1131 "${OSG_GENDOXY_CONFIGURATION_FILE}")
1133 SET(OSG_DOC_BASIC_INPUT "${CMAKE_BINARY_DIR}/Doc/Include/OSGDummy.include")
1135 # find/process documentation include files
1136 FILE(GLOB OSG_DOC_INCLUDES "${CMAKE_SOURCE_DIR}/Doc/Include/*.include")
1138 FOREACH(_OSG_DOC_INCLUDE_FULL ${OSG_DOC_INCLUDES})
1140 GET_FILENAME_COMPONENT(_OSG_DOC_INCLUDE ${_OSG_DOC_INCLUDE_FULL} NAME)
1142 CONFIGURE_FILE("${_OSG_DOC_INCLUDE_FULL}"
1143 "${CMAKE_BINARY_DIR}/Doc/Include/${_OSG_DOC_INCLUDE}")
1148 FILE(APPEND ${OSG_DOXY_CONFIGURATION_FILE}
1149 "@INCLUDE = ${OSG_DOXY_INPUTS}\n")
1150 ENDIF(OSG_DOXY_INPUTS)
1153 IF(DOXYGEN_EXECUTABLE)
1154 ADD_CUSTOM_TARGET(DocUpload COMMAND unison -batch -ui text opensg_doc)
1155 ADD_DEPENDENCIES(DocUpload Doc)
1158 ADD_CUSTOM_TARGET(DocSyncGV
1159 COMMAND rsync html -av --delete html rsync://tombstone.camtech.ntu.edu.sg/opensgdoc
1160 WORKING_DIRECTORY Doc)
1162 ADD_CUSTOM_TARGET(DocCompleteGV)
1163 ADD_DEPENDENCIES(DocCompleteGV Doc DocSyncGV)
1164 ENDIF(DOXYGEN_EXECUTABLE)
1166 ADD_CUSTOM_TARGET(OSGAllCoreLibs)
1172 FOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1173 IF(EXISTS ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.PrePasses.cmake)
1174 INCLUDE(${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.PrePasses.cmake)
1175 ENDIF(EXISTS ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.PrePasses.cmake)
1176 ENDFOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1182 FOREACH(_OSGCORE_EXT_DIR ${OSG_CORE_EXTENSIONS})
1183 MESSAGE(STATUS "processing core ext : ${_OSGCORE_EXT_DIR}")
1185 FILE(GLOB_RECURSE _OSG_LIBRARY_EXT_CONFIG_FILES
1186 "${_OSGCORE_EXT_DIR}/*CMakeLists.Extension.*.txt")
1188 FOREACH(_OSGCORE_EXT_FILE ${_OSG_LIBRARY_EXT_CONFIG_FILES})
1189 MESSAGE(STATUS " Found and process ${_OSGCORE_EXT_FILE}")
1190 INCLUDE(${_OSGCORE_EXT_FILE})
1191 ENDFOREACH(_OSGCORE_EXT_FILE ${OSG_LIBRARY_EXT_CONFIG_FILES})
1194 ENDFOREACH(_OSGCORE_EXT_DIR ${OSG_CORE_EXTENSIONS})
1196 # Find files describing libraries to build, but make sure base
1197 # and system are processed first
1198 FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILE_BASE RELATIVE "${CMAKE_SOURCE_DIR}"
1199 "Source/CMakeLists.Lib.OSGBase.txt")
1201 FILE(GLOB_RECURSE OSG_LIBRARY_CONFIG_FILE_SYSTEM RELATIVE "${CMAKE_SOURCE_DIR}"
1202 "Source/CMakeLists.Lib.OSGSystem.txt")
1204 FILE(GLOB_RECURSE _OSG_LIBRARY_CONFIG_FILES RELATIVE "${CMAKE_SOURCE_DIR}"
1205 "Source/*CMakeLists.Lib.*.txt")
1207 LIST(REMOVE_ITEM _OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_BASE})
1208 LIST(REMOVE_ITEM _OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
1210 LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_BASE})
1211 LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${OSG_LIBRARY_CONFIG_FILE_SYSTEM})
1213 FOREACH(_OSG_LIBRARY_CONFIG ${_OSG_LIBRARY_CONFIG_FILES})
1214 STRING(REGEX MATCH Source/Contrib _OSG_FOUND_CONTRIB_CONFIG ${_OSG_LIBRARY_CONFIG})
1216 IF(_OSG_FOUND_CONTRIB_CONFIG)
1217 LIST(APPEND _OSG_CONTRIB_LIBRARY_CONFIG_FILES ${_OSG_LIBRARY_CONFIG})
1219 LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${_OSG_LIBRARY_CONFIG})
1220 ENDIF(_OSG_FOUND_CONTRIB_CONFIG)
1221 ENDFOREACH(_OSG_LIBRARY_CONFIG ${_OSG_LIBRARY_CONFIG_FILES})
1223 LIST(APPEND OSG_LIBRARY_CONFIG_FILES ${_OSG_CONTRIB_LIBRARY_CONFIG_FILES})
1225 FOREACH(_OSG_LIBRARY_CONFIG ${OSG_LIBRARY_CONFIG_FILES})
1227 GET_FILENAME_COMPONENT(_OSG_LIBCONFIG_DIR
1228 ${_OSG_LIBRARY_CONFIG}
1231 GET_FILENAME_COMPONENT(_OSG_LIBCONFIG_BASENAME
1232 ${_OSG_LIBRARY_CONFIG}
1235 STRING(REPLACE CMakeLists.Lib. "" _OSG_LIBCONFIG_BASENAME_1
1236 ${_OSG_LIBCONFIG_BASENAME})
1238 GET_FILENAME_COMPONENT(_OSG_LIBCONFIG_BASENAME
1239 ${_OSG_LIBCONFIG_BASENAME_1}
1242 IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_OSG_LIBCONFIG_DIR}/${_OSG_LIBCONFIG_BASENAME}.Prepare.cmake")
1243 INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/${_OSG_LIBCONFIG_DIR}/${_OSG_LIBCONFIG_BASENAME}.Prepare.cmake")
1251 FOREACH(PASS ${OSG_CMAKE_PASSES})
1252 SET(OSG_CMAKE_PASS ${PASS})
1254 MESSAGE(STATUS "\nPASS : ${OSG_CMAKE_PASS} in ${OSG_PASSDIR_${PASS}}\n")
1256 FOREACH(LIBCONFIGFILE ${OSG_LIBRARY_CONFIG_FILES})
1257 GET_FILENAME_COMPONENT(LIBCONFIGDIR "${LIBCONFIGFILE}" PATH)
1258 GET_FILENAME_COMPONENT(LIBFILENAME "${LIBCONFIGFILE}" NAME)
1259 STRING(REPLACE "CMakeLists.Lib." "" LIBFILENAME "${LIBFILENAME}")
1260 STRING(REPLACE ".txt" "" LIBFILENAME "${LIBFILENAME}")
1262 STRING(REGEX MATCH OSGContrib*|OSGTest* _OSG_IS_CONTRIBLIB ${LIBFILENAME})
1264 IF(_OSG_IS_CONTRIBLIB)
1265 SET(OSG_MAIN_LIB_TARGET OSGAllContribLibs)
1267 SET(OSG_MAIN_LIB_TARGET OSGAllCoreLibs)
1270 ADD_SUBDIRECTORY("${LIBCONFIGDIR}" "${OSG_PASSDIR_${PASS}}/${LIBFILENAME}")
1271 ENDFOREACH(LIBCONFIGFILE)
1273 SET(OSG_MAIN_LIB_TARGET OSGAllContribLibs)
1275 FOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1276 ADD_SUBDIRECTORY("${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}"
1277 "External/${EXTERNAL_CONFIG}/${OSG_PASSDIR_${PASS}}")
1278 ENDFOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1283 IF(NOT OSG_BUILD_DEPENDEND)
1284 OSG_WRITE_SETTINGS(${CMAKE_BINARY_DIR}/CMake.settings)
1285 ENDIF(NOT OSG_BUILD_DEPENDEND)
1294 COMMAND "${CMAKE_COMMAND}" -E copy
1295 "${CMAKE_SOURCE_DIR}/OSGConfigured.h.cmake"
1296 "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp.cmake")
1298 FOREACH(_OSG_ADD_CONFIGURE_LINE ${OSG_ADDITIONAL_CONFIGURE_LINES})
1299 FILE(APPEND "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp.cmake" "\n${_OSG_ADD_CONFIGURE_LINE}\n")
1302 FILE(APPEND "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp.cmake" "\n#endif // _OSGCONFIGURED_H_\n")
1304 CONFIGURE_FILE("${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp.cmake"
1305 "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp")
1308 COMMAND "${CMAKE_COMMAND}" -E copy_if_different
1309 "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h.tmp"
1310 "${CMAKE_BINARY_DIR}/Source/Base/Base/OSGConfigured.h")
1316 ADD_CUSTOM_TARGET(OSGAllExamples)
1317 ADD_DEPENDENCIES(OSGAll OSGAllExamples)
1319 IF(OSGBUILD_EXAMPLES_SIMPLE)
1320 ADD_CUSTOM_TARGET(OSGAllSimpleExamples)
1321 ADD_SUBDIRECTORY("Examples/Simple")
1322 ADD_DEPENDENCIES(OSGAllExamples OSGAllSimpleExamples)
1323 ENDIF(OSGBUILD_EXAMPLES_SIMPLE)
1329 IF(OSGBUILD_EXAMPLES_ADVANCED)
1330 ADD_CUSTOM_TARGET(OSGAllAdvancedExamples)
1331 ADD_SUBDIRECTORY("Examples/Advanced/DeferredShading")
1332 ADD_SUBDIRECTORY("Examples/Advanced/Character")
1333 ADD_DEPENDENCIES(OSGAllExamples OSGAllAdvancedExamples)
1334 ENDIF(OSGBUILD_EXAMPLES_ADVANCED)
1340 IF(OSGBUILD_EXAMPLES_TUTORIAL)
1341 ADD_CUSTOM_TARGET(OSGAllTutorialExamples)
1342 ADD_SUBDIRECTORY("Examples/Tutorial")
1343 ADD_DEPENDENCIES(OSGAllExamples OSGAllTutorialExamples)
1344 ENDIF(OSGBUILD_EXAMPLES_TUTORIAL)
1350 FOREACH(_OSGCORE_EXT_EXAMPLE_DIR ${OSG_CORE_EXAMPLE_EXTENSIONS})
1351 MESSAGE(STATUS "processing example ext : ${_OSGCORE_EXT_EXAMPLE_DIR}")
1353 IF(EXISTS ${_OSGCORE_EXT_EXAMPLE_DIR}/CMakeLists.Examples.txt)
1354 MESSAGE(STATUS " Found and process ${_OSGCORE_EXT_EXAMPLE_DIR}/CMakeLists.Examples.txt")
1355 INCLUDE(${_OSGCORE_EXT_EXAMPLE_DIR}/CMakeLists.Examples.txt)
1356 ENDIF(EXISTS ${_OSGCORE_EXT_EXAMPLE_DIR}/CMakeLists.Examples.txt)
1357 ENDFOREACH(_OSGCORE_EXT_EXAMPLE_DIR ${OSG_CORE_EXAMPLE_EXTENSIONS})
1363 SET(OSG_DOC_PIPES "")
1365 IF(OSG_DOXY_STDOUT_LOG)
1366 SET(OSG_DOC_PIPES > ${OSG_DOXY_STDOUT_LOG})
1367 ENDIF(OSG_DOXY_STDOUT_LOG)
1369 IF(DOXYGEN_EXECUTABLE)
1370 IF(NOT OSG_GENERATE_SEPARATE_LIB_DOC)
1371 ADD_CUSTOM_TARGET(Doc
1373 COMMAND ${DOXYGEN_EXECUTABLE} ${OSG_DOXY_CONFIGURATION_FILE} ${OSG_DOC_PIPES})
1377 IF(DOXYGEN_EXECUTABLE)
1378 ADD_CUSTOM_TARGET(GenDoc
1380 COMMAND ${DOXYGEN_EXECUTABLE} ${OSG_GENDOXY_CONFIGURATION_FILE} ${OSG_DOC_PIPES})
1387 FOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1388 IF(EXISTS ${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Finalize.cmake)
1389 INCLUDE(${OSG_${EXTERNAL_CONFIG}_SOURCE_DIR}/${EXTERNAL_CONFIG}.Finalize.cmake)
1391 ENDFOREACH(EXTERNAL_CONFIG ${OSG_EXTERNAL_CONFIGS})
1397 # osg2-config is created from multiple parts (parts 1 and 3 static, part 2
1398 # is generated during the OSGCOLLECT pass.
1400 # substitute variables in static parts
1401 CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/CMake/osg2-config.part1.in"
1402 "${CMAKE_BINARY_DIR}/bin/osg2-config.part1.tmp")
1403 CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/CMake/osg2-config.part3.in"
1404 "${CMAKE_BINARY_DIR}/bin/osg2-config.part3.tmp")
1407 FILE(READ "${CMAKE_BINARY_DIR}/bin/osg2-config.part1.tmp" OSG2_CONFIG_PART1_CONTENT)
1408 FILE(READ "${CMAKE_BINARY_DIR}/bin/osg2-config.part2.tmp" OSG2_CONFIG_PART2_CONTENT)
1409 FILE(READ "${CMAKE_BINARY_DIR}/bin/osg2-config.part3.tmp" OSG2_CONFIG_PART3_CONTENT)
1411 # concatenate final file
1412 FILE(WRITE "${CMAKE_BINARY_DIR}/bin/osg2-config" "${OSG2_CONFIG_PART1_CONTENT}")
1413 FILE(APPEND "${CMAKE_BINARY_DIR}/bin/osg2-config" "${OSG2_CONFIG_PART2_CONTENT}")
1414 FILE(APPEND "${CMAKE_BINARY_DIR}/bin/osg2-config" "${OSG2_CONFIG_PART3_CONTENT}")
1416 FILE(REMOVE "${CMAKE_BINARY_DIR}/bin/osg2-config.part1.tmp")
1417 FILE(REMOVE "${CMAKE_BINARY_DIR}/bin/osg2-config.part2.tmp")
1418 FILE(REMOVE "${CMAKE_BINARY_DIR}/bin/osg2-config.part3.tmp")
1420 INSTALL(PROGRAMS "${CMAKE_BINARY_DIR}/bin/osg2-config"
1422 # COMPONENT development_tools)
1428 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/cmake)
1430 STRING(TOUPPER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_UP)
1432 STRING(REPLACE "OpenSG" "OSG" CMAKE_PROJECT_NAME_SHORT ${CMAKE_PROJECT_NAME})
1434 STRING(TOUPPER "OpenSG" ${CMAKE_PROJECT_NAME_SHORT} ${CMAKE_PROJECT_NAME_SHORT_UP})
1436 CONFIGURE_FILE(CMake/FindOpenSG.cmake.in
1437 ${CMAKE_BINARY_DIR}/cmake/Find${CMAKE_PROJECT_NAME}.cmake
1440 INSTALL(FILES "${CMAKE_BINARY_DIR}/cmake/FindOpenSG.cmake"
1441 DESTINATION share/OpenSG/cmake)
1442 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindOpenSG.cmake.in"
1443 DESTINATION share/OpenSG/cmake)
1444 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindCollada.cmake"
1445 DESTINATION share/OpenSG/cmake)
1446 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindOpenEXR.cmake"
1447 DESTINATION share/OpenSG/cmake)
1448 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindExpat_OpenSG.cmake"
1449 DESTINATION share/OpenSG/cmake)
1450 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindGLUT_OpenSG.cmake"
1451 DESTINATION share/OpenSG/cmake)
1452 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindJPEG_OpenSG.cmake"
1453 DESTINATION share/OpenSG/cmake)
1454 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindGLEW_OpenSG.cmake"
1455 DESTINATION share/OpenSG/cmake)
1456 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindPNG_OpenSG.cmake"
1457 DESTINATION share/OpenSG/cmake)
1458 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindTIFF_OpenSG.cmake"
1459 DESTINATION share/OpenSG/cmake)
1460 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/FindZLIB_OpenSG.cmake"
1461 DESTINATION share/OpenSG/cmake)
1462 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGSetupCompiler.cmake"
1463 DESTINATION share/OpenSG/cmake)
1464 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGUpdateCompiler.cmake"
1465 DESTINATION share/OpenSG/cmake)
1466 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGBuildFunctions.cmake"
1467 DESTINATION share/OpenSG/cmake)
1468 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGConfigurePackages.cmake"
1469 DESTINATION share/OpenSG/cmake)
1470 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGExternalProjectHelper.cmake"
1471 DESTINATION share/OpenSG/cmake)
1472 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OpenSGVersion.cmake"
1473 DESTINATION share/OpenSG/cmake)
1474 INSTALL(FILES "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1475 DESTINATION share/OpenSG/cmake)
1476 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGCommonOptions.cmake"
1477 DESTINATION share/OpenSG/cmake)
1478 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGCommonConfig.cmake"
1479 DESTINATION share/OpenSG/cmake)
1480 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/OSGCommonSupportConfig.cmake"
1481 DESTINATION share/OpenSG/cmake)
1483 INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/Tools/fcd2code"
1485 # COMPONENT development_tools
1486 PATTERN "*/fcd2code/fcd2code" EXCLUDE
1487 PATTERN "*.pyc" EXCLUDE
1488 PATTERN ".svn" EXCLUDE)
1489 INSTALL(PROGRAMS "${CMAKE_SOURCE_DIR}/Tools/fcd2code/fcd2code"
1490 DESTINATION bin/fcd2code)
1496 IF(OSGBUILD_PYTHON_BINDINGS)
1497 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} Python/Helper/genLibOrder.py
1498 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
1499 OUTPUT_VARIABLE _OSG_LIBORDER)
1503 SET(_OSG_PY_MODNAME_LIST "osg2ModuleNameList = [\n")
1504 SET(_OSG_PY_MOD_LIST "osg2ModuleList = [\n")
1506 FOREACH(_OSG_LIB ${_OSG_LIBORDER})
1507 STRING(REPLACE "\n" "" _OSG_LIB ${_OSG_LIB})
1508 SET(OSG_PYTHON_ALL_IMPORTS "${OSG_PYTHON_ALL_IMPORTS}from ..${_OSG_LIB} import *\n")
1509 SET(_OSG_PY_MOD_LIST "${_OSG_PY_MOD_LIST} ${_OSG_LIB}Py,\n")
1510 SET(_OSG_PY_MODNAME_LIST "${_OSG_PY_MODNAME_LIST} \"${_OSG_LIB}\",\n")
1513 SET(OSG_PYTHON_ALL_IMPORTS "${_OSG_PY_MODNAME_LIST} ]\n\n${OSG_PYTHON_ALL_IMPORTS}\n\n${_OSG_PY_MOD_LIST} ]\n\n")
1515 SET(_OSG_GEN_INIT_FILE_IN "${CMAKE_SOURCE_DIR}/Bindings/Python/osg.__init__.py.in")
1516 SET(_OSG_GEN_INIT_FILE_OUT "${CMAKE_SOURCE_DIR}/Bindings/Python/module/__init__.py")
1519 CONFIGURE_FILE("${_OSG_GEN_INIT_FILE_IN}"
1520 "${_OSG_GEN_INIT_FILE_OUT}")
1522 OSG_SYMLINK_CHECKED(${_OSG_GEN_INIT_FILE_OUT}
1523 ${CMAKE_BINARY_DIR}/Python/lib/osg2/osg/__init__.py)
1527 SET(_OSG_TARGET_PYLIBDIR lib/python/${_OSG_ISC}rel/osg2)
1528 SET(_OSG_TARGET_PYLIBDIR_D lib/python/${_OSG_ISC}debug/osg2)
1529 SET(_OSG_TARGET_PYLIBDIR_RN lib/python/${_OSG_ISC}relnoopt/osg2)
1530 SET(_OSG_TARGET_PYLIBDIR_DO lib/python/${_OSG_ISC}debugopt/osg2)
1532 INSTALL(FILES ${_OSG_GEN_INIT_FILE_OUT}
1533 DESTINATION ${_OSG_TARGET_PYLIBDIR}/osg
1534 CONFIGURATIONS Release)
1535 # COMPONENT release_runtimes)
1537 INSTALL(FILES ${_OSG_GEN_INIT_FILE_OUT}
1538 DESTINATION ${_OSG_TARGET_PYLIBDIR_D}/osg
1539 CONFIGURATIONS Debug)
1540 # COMPONENT debug_runtimes)
1542 INSTALL(FILES ${_OSG_GEN_INIT_FILE_OUT}
1543 DESTINATION ${_OSG_TARGET_PYLIBDIR_DO}/osg
1544 CONFIGURATIONS DebugOpt)
1545 # COMPONENT debug_opt_runtimes)
1547 INSTALL(FILES ${_OSG_GEN_INIT_FILE_OUT}
1548 DESTINATION ${_OSG_TARGET_PYLIBDIR_RN}/osg
1549 CONFIGURATIONS ReleaseNoOpt)
1550 # COMPONENT release_no_opt_runtimes)
1553 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/osg2/__init__.py
1554 DESTINATION ${_OSG_TARGET_PYLIBDIR}
1555 CONFIGURATIONS Release)
1556 # COMPONENT release_runtimes)
1558 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/__init__.py
1559 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/helpers.py
1560 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/cored_node.py
1561 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/fcd_reflector.py
1562 DESTINATION ${_OSG_TARGET_PYLIBDIR}/helpers
1563 CONFIGURATIONS Release)
1564 # COMPONENT release_runtimes)
1567 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/osg2/__init__.py
1568 DESTINATION ${_OSG_TARGET_PYLIBDIR_D}
1569 CONFIGURATIONS Debug)
1570 # COMPONENT debug_runtimes)
1572 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/__init__.py
1573 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/helpers.py
1574 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/cored_node.py
1575 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/fcd_reflector.py
1576 DESTINATION ${_OSG_TARGET_PYLIBDIR_D}/helpers
1577 CONFIGURATIONS Debug)
1578 # COMPONENT debug_runtimes)
1581 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/osg2/__init__.py
1582 DESTINATION ${_OSG_TARGET_PYLIBDIR_DO}
1583 CONFIGURATIONS DebugOpt)
1584 # COMPONENT debug_opt_runtimes)
1586 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/__init__.py
1587 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/helpers.py
1588 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/cored_node.py
1589 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/fcd_reflector.py
1590 DESTINATION ${_OSG_TARGET_PYLIBDIR_DO}/helpers
1591 CONFIGURATIONS DebugOpt)
1592 # COMPONENT debug_opt_runtimes)
1595 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/osg2/__init__.py
1596 DESTINATION ${_OSG_TARGET_PYLIBDIR_RN}
1597 CONFIGURATIONS ReleaseNoOpt)
1598 # COMPONENT release_no_opt_runtimes)
1600 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/__init__.py
1601 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/helpers.py
1602 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/cored_node.py
1603 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/fcd_reflector.py
1604 DESTINATION ${_OSG_TARGET_PYLIBDIR_RN}/helpers
1605 CONFIGURATIONS ReleaseNoOpt)
1606 # COMPONENT release_no_opt_runtimes)
1610 GET_FILENAME_COMPONENT(_PY_VERSION_DIR ${PYTHON_INCLUDE_PATH} NAME)
1611 SET(_OSG_PY_INST_BASE
1612 "lib${OSG_LIBDIR_BASE_SUFFIX}/${_PY_VERSION_DIR}/site-packages/${OSG_LIBDIR_BUILD_TYPE_SUFFIX}/osg2")
1614 INSTALL(FILES ${_OSG_GEN_INIT_FILE_OUT}
1615 DESTINATION ${_OSG_PY_INST_BASE}/osg)
1616 # COMPONENT libraries)
1618 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/osg2/__init__.py
1619 DESTINATION ${_OSG_PY_INST_BASE})
1620 # COMPONENT libraries)
1622 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/__init__.py
1623 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/helpers.py
1624 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/cored_node.py
1625 ${CMAKE_SOURCE_DIR}/Bindings/Python/helpers/fcd_reflector.py
1626 DESTINATION ${_OSG_PY_INST_BASE}/helpers)
1627 # COMPONENT libraries)
1633 INSTALL_PYTHON_ELEMENTS()
1639 IF(DOXYGEN_EXECUTABLE)
1640 IF(OSG_INSTALL_DOXYDOC)
1641 INSTALL(DIRECTORY "${OSG_DOXY_HTML_DIR}"
1642 DESTINATION share/OpenSG/documentation)
1643 # COMPONENT documentation)
1655 INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/Examples/CSM"
1656 DESTINATION share/OpenSG/Examples/)
1657 # COMPONENT examples_basic)
1663 #IF(OSGBUILD_ENABLE_PACKAGING AND FALSE)
1665 # SET(SYSTEM_SPEC ${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR})
1667 # SET(CPACK_PACKAGE_NAME "OpenSG")
1668 # SET(CPACK_PACKAGE_VERSION ${OSG_VERSION})
1669 # SET(CPACK_PACKAGE_VERSION_MAJOR ${OSG_VERSION_MAJOR})
1670 # SET(CPACK_PACKAGE_VERSION_MINOR ${OSG_VERSION_MINOR})
1671 # SET(CPACK_PACKAGE_VERSION_PATCH ${OSG_VERSION_PATCH})
1672 # SET(CPACK_PACKAGE_VENDOR "OpenSG")
1673 # SET(CPACK_PACKAGE_CONTACT "Dirk Reiners <dirk@www.opensg.org>")
1674 # SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenSG is a portable scenegraph system to create realtime 3D graphics programs")
1675 # SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
1676 # SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${OSG_VERSION}-${SYSTEM_SPEC}-${CMAKE_BUILD_TYPE}")
1678 # if (EXISTS "${CMAKE_SOURCE_DIR}/README.txt")
1679 # set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.txt")
1680 # set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.txt")
1683 # if (EXISTS "${CMAKE_SOURCE_DIR}/Welcome.txt")
1684 # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/Welcome.txt")
1687 # #Define Components
1688 # SET(CPACK_COMPONENTS_ALL development_tools
1689 # development_configuration
1693 # release_program_db
1707 # SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Files needed to execute software with OpenSG.")
1709 # SET(CPACK_COMPONENT_DEBUG_RUNTIMES_DISPLAY_NAME "Debug Runtime")
1710 # SET(CPACK_COMPONENT_DEBUG_RUNTIMES_DESCRIPTION "Debug Runtimes Libraries Description")
1711 # SET(CPACK_COMPONENT_DEBUG_RUNTIMES_GROUP "Runtime")
1712 # SET(CPACK_COMPONENT_DEBUG_RUNTIMES_INSTALL_TYPES Full Developer Runtime)
1714 # SET(CPACK_COMPONENT_RELEASE_RUNTIMES_DISPLAY_NAME "Release Runtime")
1715 # SET(CPACK_COMPONENT_RELEASE_RUNTIMES_DESCRIPTION "Release Runtime Libraries Description")
1716 # SET(CPACK_COMPONENT_RELEASE_RUNTIMES_GROUP "Runtime")
1717 # SET(CPACK_COMPONENT_RELEASE_RUNTIMES_INSTALL_TYPES Full Developer Runtime)
1720 # SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Development files needed to develop software with OpenSG.")
1723 # SET(CPACK_COMPONENT_RELEASE_LIBRARIES_DISPLAY_NAME "Release Libraries")
1724 # SET(CPACK_COMPONENT_RELEASE_LIBRARIES_DESCRIPTION "Release Libraries Description")
1725 # SET(CPACK_COMPONENT_RELEASE_LIBRARIES_GROUP "Development")
1726 # set(CPACK_COMPONENT_RELEASE_LIBRARIES_INSTALL_TYPES Full Developer)
1728 # SET(CPACK_COMPONENT_DEBUG_LIBRARIES_DISPLAY_NAME "Debug Libraries")
1729 # SET(CPACK_COMPONENT_DEBUG_LIBRARIES_DESCRIPTION "Debug Libraries Description")
1730 # SET(CPACK_COMPONENT_DEBUG_LIBRARIES_GROUP "Development")
1731 # SET(CPACK_COMPONENT_DEBUG_LIBRARIES_INSTALL_TYPES Full Developer)
1734 # SET(CPACK_COMPONENT_RELEASE_PROGRAM_DB_DISPLAY_NAME "Release Program Database")
1735 # SET(CPACK_COMPONENT_RELEASE_PROGRAM_DB_DESCRIPTION "Release Program Database Description")
1736 # SET(CPACK_COMPONENT_RELEASE_PROGRAM_DB_GROUP "Development")
1737 # SET(CPACK_COMPONENT_RELEASE_PROGRAM_DB_INSTALL_TYPES Full Developer)
1739 # SET(CPACK_COMPONENT_DEBUG_PROGRAM_DB_DISPLAY_NAME "Debug Program Database")
1740 # SET(CPACK_COMPONENT_DEBUG_PROGRAM_DB_DESCRIPTION "Debug Program Database Description")
1741 # SET(CPACK_COMPONENT_DEBUG_PROGRAM_DB_GROUP "Development")
1742 # SET(CPACK_COMPONENT_DEBUG_PROGRAM_DB_INSTALL_TYPES Full Developer)
1745 # SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_DISPLAY_NAME "Tools")
1746 # SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_DESCRIPTION "Tools Description")
1747 # SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_GROUP "Development")
1748 # SET(CPACK_COMPONENT_DEVELOPMENT_TOOLS_INSTALL_TYPES Full Developer)
1751 # SET(CPACK_COMPONENT_DEVELOPMENT_CONFIGURATION_DISPLAY_NAME "Cmake Configuration")
1752 # SET(CPACK_COMPONENT_DEVELOPMENT_CONFIGURATION_DESCRIPTION "Cmake files")
1753 # SET(CPACK_COMPONENT_DEVELOPMENT_CONFIGURATION_GROUP "Development")
1754 # SET(CPACK_COMPONENT_DEVELOPMENT_CONFIGURATION_INSTALL_TYPES Full Developer)
1757 # SET(CPACK_COMPONENT_CODE_HEADERS_DISPLAY_NAME "C++ Headers")
1758 # SET(CPACK_COMPONENT_CODE_HEADERS_DESCRIPTION "C++ Header, inline, and insert files.")
1759 # SET(CPACK_COMPONENT_CODE_HEADERS_GROUP "Development")
1760 # SET(CPACK_COMPONENT_CODE_HEADERS_INSTALL_TYPES Full Developer)
1763 # SET(CPACK_COMPONENT_GROUP_EXAMPES_DESCRIPTION "OpenSG Examples.")
1765 # SET(CPACK_COMPONENT_EXAMPLES_BASIC_DISPLAY_NAME "Simple Examples")
1766 # SET(CPACK_COMPONENT_EXAMPLES_BASIC_DESCRIPTION "A Collection of Simple OpenSG Examples")
1767 # SET(CPACK_COMPONENT_EXAMPLES_BASIC_GROUP "Examples")
1768 # SET(CPACK_COMPONENT_EXAMPLES_BASIC_INSTALL_TYPES Full Developer)
1770 # SET(CPACK_COMPONENT_EXAMPLES_ADVANCED_DISPLAY_NAME "Advanced Examples")
1771 # SET(CPACK_COMPONENT_EXAMPLES_ADVANCED_DESCRIPTION "A Collection of Advanced OpenSG Examples")
1772 # SET(CPACK_COMPONENT_EXAMPLES_ADVANCED_GROUP "Examples")
1773 # SET(CPACK_COMPONENT_EXAMPLES_ADVANCED_INSTALL_TYPES Full Developer)
1776 # SET(CPACK_COMPONENT_GROUP_DATA_DESCRIPTION "Extra Data files.")
1778 # SET(CPACK_COMPONENT_DATA_IMAGES_DISPLAY_NAME "Images")
1779 # SET(CPACK_COMPONENT_DATA_IMAGES_DESCRIPTION "OpenSG Images and Icons")
1780 # SET(CPACK_COMPONENT_DATA_IMAGES_GROUP "Data")
1781 # SET(CPACK_COMPONENT_DATA_IMAGES_INSTALL_TYPES Full Developer Runtime)
1784 # SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Documentation.")
1790 # #NSIS specific configuration
1792 # INCLUDE(InstallRequiredSystemLibraries)
1793 # IF(OSGBUILD_PACKAGE_TYPE STREQUAL "NSIS")
1794 # IF(MSVC AND (${CMAKE_VERSION} VERSION_GREATER "2.8.0" OR
1795 # ${CMAKE_VERSION} VERSION_EQUAL "2.8.0" ))
1796 # include(CMakeDetermineVSServicePack)
1797 # DetermineVSServicePack( my_service_pack )
1799 # IF( my_service_pack )
1800 # SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${OSG_VERSION}-${SYSTEM_SPEC}-${my_service_pack}")
1804 # #Extra install commands
1805 # SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "")
1806 # SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "")
1809 # SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/OpenSG2_Icon.ico")
1810 # SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/OpenSG2_Icon.ico")
1811 # FILE(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/InstallerHeader.bmp" CPACK_PACKAGE_ICON)
1812 # SET(CPACK_NSIS_MODIFY_PATH ON)
1813 # SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CPACK_PACKAGE_NAME}")
1814 # SET(CPACK_NSIS_HELP_LINK "http://www.opensg.org/wiki/Help")
1815 # SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.opensg.org")
1816 # SET(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")
1817 # SET(CPACK_NSIS_CREATE_ICONS_EXTRA "createShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME} Directory.lnk' '$INSTDIR'")
1818 # SET(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\${PROJECT_NAME} Directory.lnk'")
1819 # SET(CPACK_NSIS_MENU_LINKS "")
1820 # #FILE(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/InstallFinish.bmp" CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP)
1821 # #FILE(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/UnInstallFinish.bmp" CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP)
1826 # # Date macro by Benoit RAT (www.neub.co.nr)
1827 # MACRO (TODAY RESULT)
1829 # EXECUTE_PROCESS(COMMAND "date /T" OUTPUT_VARIABLE ${RESULT})
1830 # string(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" "${RESULT}" "${${RESULT}}")
1832 # EXECUTE_PROCESS(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
1833 # string(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" "${RESULT}" "${${RESULT}}")
1835 # MESSAGE(SEND_ERROR "date not implemented")
1836 # SET(${RESULT} 000000)
1842 # # Determine package type
1843 # IF(OSGBUILD_PACKAGE_TYPE STREQUAL "")
1845 # SET(OSGBUILD_PACKAGE_TYPE "ZIP")
1847 # SET(OSGBUILD_PACKAGE_TYPE "RPM")
1849 # ENDIF(OSGBUILD_PACKAGE_TYPE STREQUAL "")
1851 # STRING(TOUPPER ${OSGBUILD_PACKAGE_TYPE} CPACK_GENERATOR)
1853 # IF(${CPACK_GENERATOR} STREQUAL "TBZ2")
1854 # SET( PACK_EXT "tar.bz2" )
1855 # ELSEIF(${CPACK_GENERATOR} STREQUAL "TGZ")
1856 # SET( PACK_EXT "tar.gz" )
1858 # STRING(TOLOWER ${OSGBUILD_PACKAGE_TYPE} PACK_EXT)
1861 # SET(PACKAGE "${CPACK_PACKAGE_FILE_NAME}.${PACK_EXT}")
1862 # SET(OUTFILE "${CPACK_PACKAGE_FILE_NAME}-${BUILDNAME}-${DATE}.${PACK_EXT}")
1867 # # For some reason using ${CPACK_OUTPUT_FILE_NAME} in here doesn't work, and neither does setting PACKAGE to it. :(
1869 # #TODO: Need a way to do this on Windows
1870 # #ADD_CUSTOM_TARGET(PackageUpload COMMAND curl -F "code=${OPENSG_UPLOAD_CODE}" -F "quiet=1" -F "out=${OUTFILE}" -F "file=@${PACKAGE}" http://www.opensg.org/htdocs/drop.php )
1871 # #ADD_DEPENDENCIES(PackageUpload "${CPACK_OUTPUT_FILE_NAME}")
1873 # ADD_CUSTOM_TARGET(PackageUpload COMMAND curl -F "code=${OPENSG_UPLOAD_CODE}" -F "quiet=1" -F "out=${OUTFILE}" -F "file=@${PACKAGE}" http://www.opensg.org/htdocs/drop.php )
1874 # ADD_DEPENDENCIES(PackageUpload "${CPACK_OUTPUT_FILE_NAME}")
1878 #ENDIF(OSGBUILD_ENABLE_PACKAGING AND FALSE)
1881 CONFIGURE_FILE(CMake/CMakeLists.packaging.unix.txt
1882 ${CMAKE_BINARY_DIR}/CMakeLists.packaging.txt
1886 IF(OSG_DISABLE_MICROSOFT_SECURE_CXXX)
1887 SET(OSG_WIN_SEC "nosec")
1889 SET(OSG_WIN_SEC "msdefault")
1892 CONFIGURE_FILE(CMake/CMakeLists.packaging.win.txt
1893 ${CMAKE_BINARY_DIR}/CMakeLists.packaging.txt
1895 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/OpenSG2_Icon.ico"
1896 DESTINATION share/OpenSG/Packaging
1897 # COMPONENT packaging
1898 PERMISSIONS OWNER_WRITE OWNER_READ
1902 INSTALL(FILES "${CMAKE_SOURCE_DIR}/CMake/Packaging/Windows/InstallerHeader.bmp"
1903 DESTINATION share/OpenSG/Packaging
1904 # COMPONENT packaging
1905 PERMISSIONS OWNER_WRITE OWNER_READ
1910 INSTALL(FILES ${CMAKE_BINARY_DIR}/CMakeLists.packaging.txt
1911 DESTINATION share/OpenSG/Packaging
1912 # COMPONENT packaging
1913 PERMISSIONS OWNER_WRITE OWNER_READ
1916 RENAME CMakeLists.txt)
1918 INSTALL(FILES ${CMAKE_SOURCE_DIR}/COPYING
1919 DESTINATION share/doc/OpenSG/
1921 PERMISSIONS OWNER_WRITE OWNER_READ
1925 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Source/Contrib/PLY/README
1926 DESTINATION share/doc/OpenSG/
1928 PERMISSIONS OWNER_WRITE OWNER_READ
1933 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Source/Contrib/TrapezoidalShadowMaps/README
1934 DESTINATION share/doc/OpenSG/
1936 PERMISSIONS OWNER_WRITE OWNER_READ
1941 INSTALL(FILES ${CMAKE_SOURCE_DIR}/Source/Contrib/Rhino3DLoader/README
1942 DESTINATION share/doc/OpenSG/
1944 PERMISSIONS OWNER_WRITE OWNER_READ
1947 RENAME README.rhine)
1950 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;DebugOpt;ReleaseNoOpt"
1951 CACHE STRING "OpenSG Build Types" FORCE )
1953 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;DebugGV"
1954 CACHE STRING "OpenSG Build Types" FORCE )
1957 SET(CMAKE_CONFIGURATION_TYPES "Debug;Release;Debug-iphonesimulator;Release-iphonesimulator;Debug-iphoneos;Release-iphoneos"
1958 CACHE STRING "OpenSG Build Types" FORCE )
1962 FILE(APPEND "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1963 "SET(OSG_DISABLE_MICROSOFT_SECURE_CXXX ${OSG_DISABLE_MICROSOFT_SECURE_CXXX} CACHE INTERNAL \"\" FORCE)\n\n")
1965 FILE(APPEND "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1966 "SET(OSG_DISABLE_MS_ITERATOR_DEBUGGING ${OSG_DISABLE_MS_ITERATOR_DEBUGGING} CACHE INTERNAL \"\" FORCE)\n\n")
1970 FILE(APPEND "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1971 "SET(BOOST_ROOT \"${BOOST_ROOT}\" CACHE PATH \"\")\n\n")
1973 FILE(APPEND "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1974 "SET(OSG_SUPPORT_ROOT \"${OSG_SUPPORT_ROOT}\" CACHE PATH \"\")\n\n")
1976 FILE(APPEND "${CMAKE_BINARY_DIR}/OpenSGExtDep.cmake"
1977 "SET(OSG_USE_OSGSUPPORT_LIBS ${OSG_USE_OSGSUPPORT_LIBS} CACHE BOOL \"\")\n\n")
1979 ###########################
1980 # Component install Setting
1981 ###########################
1983 GET_CMAKE_PROPERTY(OSG_COMPONENT_LIST COMPONENTS)
1986 ADD_CUSTOM_TARGET(OSG_preinstall
1988 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
1992 FOREACH(_OSG_CMP ${OSG_COMPONENT_LIST})
1995 ADD_CUSTOM_TARGET(INSTALL_${_OSG_CMP}
1996 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${_OSG_CMP} -P cmake_install.cmake
1997 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
2000 SET(_OSG_CMP_CONF Release)
2002 IF(${_OSG_CMP} MATCHES ^debug_)
2003 SET(_OSG_CMP_CONF Debug)
2006 ADD_CUSTOM_TARGET(INSTALL_${_OSG_CMP}
2007 COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${_OSG_CMP} -DCMAKE_INSTALL_CONFIG_NAME=${_OSG_CMP_CONF} -P cmake_install.cmake
2008 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
2010 SET_PROPERTY(TARGET INSTALL_${_OSG_CMP} PROPERTY FOLDER "Packaging")
2014 ADD_DEPENDENCIES(INSTALL_${_OSG_CMP} OSG_preinstall)
2022 ADD_CUSTOM_TARGET(INSTALL_runtime)
2024 ADD_DEPENDENCIES(INSTALL_runtime INSTALL_release_runtimes)
2025 ADD_DEPENDENCIES(INSTALL_runtime INSTALL_release_binaries)
2027 SET_PROPERTY(TARGET INSTALL_runtime PROPERTY FOLDER "Packaging")
2031 ADD_CUSTOM_TARGET(INSTALL_runtime)
2033 ADD_DEPENDENCIES(INSTALL_runtime INSTALL_libraries)
2034 ADD_DEPENDENCIES(INSTALL_runtime INSTALL_binaries)
2038 # SET_PROPERTY(TARGET ALL_BUILD PROPERTY FOLDER "CMakePredefinedTargets")
2046 IF(NOT OSG_BUILD_DEPENDEND)
2047 OSG_WRITE_OSGBUILD(${CMAKE_BINARY_DIR}/CMake.build.settings)
2048 OSG_WRITE_OSGGLOBALSETUP(${CMAKE_BINARY_DIR}/CMake.global.settings)
2049 ENDIF(NOT OSG_BUILD_DEPENDEND)
2053 CUDA_BUILD_CLEAN_TARGET()
2054 ENDIF(OSG_WITH_CUDA)
2057 GET_CMAKE_PROPERTY(_variableNames VARIABLES)
2059 FOREACH(_variableName ${_variableNames})
2060 IF(_variableName MATCHES "^OSG")
2061 # MESSAGE("FOO : ${_variableName}")
2062 # FILE(APPEND ${FILENAME}
2063 # "SET(${_variableName} ${${_variableName}} CACHE BOOL \"\" FORCE)\n")