fixed: let the material fill the override chunk block
[opensg.git] / Source / System / CMakeLists.Lib.OSGSystem.txt
blob33dc239390ec7cafa79d523def6011787cc66d50
2 OSG_ADD_PROJECT("OSGSystem")
3 OSG_SELECT_PROJECT()
5 ##############################################################################
6 # dependencies
7 ##############################################################################
9 # dependencies - OpenSG
10 SET(${PROJECT_NAME}_DEP_OSG_LIB OSGBase)
11 SET(${PROJECT_NAME}_DEP_TEST_OSG_LIB OSGDrawable
12                                      OSGGroup
13                                      OSGState
14                                      OSGUtil
15                                      OSGWindowGLUT)
16 SET(${PROJECT_NAME}_DEP_UNITTEST_OSG_LIB OSGGroup)
18 # dependencies - External
19 SET(${PROJECT_NAME}_DEP_LIB ZLIB_LIBRARIES OPENGL_gl_LIBRARY OPENGL_glu_LIBRARY)
21 #MESSAGE(STATUS "sys: zlib: ${ZLIB_FOUND}") 
23 IF(WIN32 AND OSG_WITH_ZLIB)
24 #    SET(${PROJECT_NAME}_DEP_LIBDIR ZLIB_LIBRARY_DIR)
25     SET(${PROJECT_NAME}_DEP_INCDIR ZLIB_INCLUDE_DIR)
26 ENDIF(WIN32 AND OSG_WITH_ZLIB)
28 IF(OSG_WITH_CUDA)
29   SET(${PROJECT_NAME}_DEP_INCDIR ${${PROJECT_NAME}_DEP_INCDIR} 
30                                  CUDA_TOOLKIT_INCLUDE)
31   SET(${PROJECT_NAME}_DEP_LIB    ${${PROJECT_NAME}_DEP_LIB} 
32                                  CUDA_CUDART_LIBRARY)
33 ENDIF(OSG_WITH_CUDA)
35 # SET(${PROJECT_NAME}_DEP_TEST_LIB)
36 # SET(${PROJECT_NAME}_DEP_TEST_LIBDIR)
37 # SET(${PROJECT_NAME}_DEP_TEST_INCDIR OSG_GLUT_INC_DIR)
39 IF(OSG_OGL_COREONLY AND NOT OSG_CHECK_COREONLY)
40   SET(_OSG_EX_RBBASE "${CMAKE_CURRENT_SOURCE_DIR}/RenderingBackend")
42   SET(${PROJECT_NAME}_EXCL_FILES 
43       ${_OSG_EX_RBBASE}/OSGOcclusionCullingTreeBuilder.h
44       ${_OSG_EX_RBBASE}/OSGOcclusionCullingTreeBuilder.inl
45       ${_OSG_EX_RBBASE}/OSGOcclusionCullingTreeBuilder.cpp)
46 ENDIF()
48 OSG_ADD_GLUTPACKAGE(TRUE)
50 # dependencies - Additional
51 SET(${PROJECT_NAME}_DEP_ADD_INCDIR ${CMAKE_SOURCE_DIR}/Source/External)
53 SET(${PROJECT_NAME}_CXXFLAGS ${OSG_ADD_CXX_FLAGS})
55 OSG_STORE_PROJECT_DEPENDENCIES()
57 ##############################################################################
58 # collect sources
59 ##############################################################################
61 OSG_ADD_DIRECTORY("Source/System/Action/Base")
62 OSG_ADD_DIRECTORY("Source/System/Action/IntersectAction")
63 OSG_ADD_DIRECTORY("Source/System/Action/RenderAction")
64 OSG_ADD_DIRECTORY("Source/System/FieldContainer/Attachments")
65 OSG_ADD_DIRECTORY("Source/System/FieldContainer/Base")
66 OSG_ADD_DIRECTORY("Source/System/FieldContainer/Mixins")
67 OSG_ADD_DIRECTORY("Source/System/FieldContainer/Misc")
68 OSG_ADD_DIRECTORY("Source/System/FieldContainer/Field")
69 OSG_ADD_DIRECTORY("Source/System/FileIO/Base")
70 OSG_ADD_DIRECTORY("Source/System/FileIO/OSG")
71 OSG_ADD_DIRECTORY("Source/System/FileIO/ScanParseSkel")
73 IF(NOT OSG_ENABLE_SCANPARSE_REGEN)
74   IF(OSG_USE_OSG2_NAMESPACE)
75     OSG_ADD_DIRECTORY("Source/System/FileIO/ScanParseSkel/prebuildOSG2")
76   ELSE()
77     OSG_ADD_DIRECTORY("Source/System/FileIO/ScanParseSkel/prebuild")
78   ENDIF()
79 ENDIF(NOT OSG_ENABLE_SCANPARSE_REGEN)
81 OSG_ADD_DIRECTORY("Source/System/GraphOp/Base")
82 OSG_ADD_DIRECTORY("Source/System/Image")
83 OSG_ADD_DIRECTORY("Source/System/Image/Squish")
84 OSG_ADD_DIRECTORY("Source/System/Material/Base")
85 OSG_ADD_DIRECTORY("Source/System/NodeCores/Drawables/Base")
86 OSG_ADD_DIRECTORY("Source/System/NodeCores/Groups/Base")
87 OSG_ADD_DIRECTORY("Source/System/NodeCores/Drawables/Geometry/PropertiesBase")
88 OSG_ADD_DIRECTORY("Source/System/RenderingBackend")
89 OSG_ADD_DIRECTORY("Source/System/State/Base")
90 OSG_ADD_DIRECTORY("Source/System/Statistics/Base")
91 OSG_ADD_DIRECTORY("Source/System/Window/Base")
92 OSG_ADD_DIRECTORY("Source/System/Window/FrameBufferObjects")
94 IF(OSG_ENABLE_NEW_SHADER)
95     OSG_ADD_DIRECTORY("Source/System/State/Shader/Base")
96     OSG_ADD_DIRECTORY("Source/System/State/Shader/Chunks")
97     OSG_ADD_DIRECTORY("Source/System/State/Shader/SHL")
98     OSG_ADD_DIRECTORY("Source/System/State/Shader/Variables")
99 ENDIF(OSG_ENABLE_NEW_SHADER)
101 IF(OSGCOMPAT_ENABLE_DEPRECATED)
102     OSG_ADD_DIRECTORY("Source/System/Depreciated")
103     OSG_ADD_DIRECTORY("Source/System/Depreciated/State")
105     IF(NOT CMAKE_BUILD_TYPE STREQUAL "DebugGV" AND
106        NOT CMAKE_BUILD_TYPE STREQUAL "ReleaseGV" )
108         OSG_ADD_DIRECTORY("Source/System/Depreciated/State/OpenGL")
110     ENDIF()
112     IF(OSG_ENABLE_NEW_SHADER)
113         OSG_ADD_DIRECTORY("Source/System/Depreciated/State/Shader")
114     ENDIF(OSG_ENABLE_NEW_SHADER)
115 ENDIF(OSGCOMPAT_ENABLE_DEPRECATED)
118 IF(${OSG_CMAKE_PASS} STREQUAL "OSGCOLLECT")
119     FILE(APPEND ${${PROJECT_NAME}_BUILD_FILE}
120         "LIST(APPEND ${PROJECT_NAME}_INC \"${CMAKE_SOURCE_DIR}/Source/External\")\n\n")
122     FILE(APPEND ${${PROJECT_NAME}_BUILD_FILE}
123         "LIST(APPEND ${PROJECT_NAME}_HDR
124             \"${CMAKE_SOURCE_DIR}/Source/External/google/dense_hash_map\"
125             \"${CMAKE_SOURCE_DIR}/Source/External/google/dense_hash_set\"
126             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparse_hash_map\"
127             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparse_hash_set\"
128             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparsetable\"
129             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparsehash/config.h\"
130             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparsehash/densehashtable.h\"
131             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparsehash/hash_fun.h\"
132             \"${CMAKE_SOURCE_DIR}/Source/External/google/sparsehash/sparsehashtable.h\")\n\n")
134     IF(NOT OSG_ENABLE_SCANPARSE_REGEN)
135       FILE(APPEND ${${PROJECT_NAME}_BUILD_FILE}
136         "LIST(APPEND ${PROJECT_NAME}_HDR
137             \"${CMAKE_SOURCE_DIR}/Source/System/FileIO/ScanParseSkel/prebuild/OSGScanParseSkelParser.hpp\")\n\n")
138     ENDIF(NOT OSG_ENABLE_SCANPARSE_REGEN)
139 ENDIF(${OSG_CMAKE_PASS} STREQUAL "OSGCOLLECT")
142 ##############################################################################
143 # setup build
144 ##############################################################################
146 ##############################################################################
147 # setup python bindings
148 ##############################################################################
150 IF(${OSG_CMAKE_PASS} STREQUAL "OSGPYTHON")
152   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "SystemWrappers.h")
154   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGImageFileHandler.h")
155   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGImageFileType.h")
156   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGSceneFileHandler.h")
157   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGSceneFileType.h")
158   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGGraphOpSeq.h")
159   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGCylinderVolume.h")
160   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGVolumeDraw.h")
161   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGState.h")
162   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGBackground.h")
163   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGLightEnv.h")
164   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGGraphOpFactory.h")
165   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGGraphOp.h")
166   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGGraphOpSeq.h")
167   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGShaderCache.h")
168   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGTraversalValidator.h")
169   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGRenderTreeNodePool.h")
170   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGRenderPartition.h")
171   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGTreeBuilderBase.h")
172   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGRenderAction.h")
173   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGIntersectAction.h")
174   LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_HEADERS "OSGStateOverride.h")
176 #  LIST(APPEND ${PROJECT_NAME}_PYTHON_BIND_FCS "Group")
177 ENDIF(${OSG_CMAKE_PASS} STREQUAL "OSGPYTHON")
179 ##############################################################################
180 # setup doxygen documentation
181 ##############################################################################
182 SET(${PROJECT_NAME}_DOXY_EXTRA_INC "")
184 OSG_SETUP_PROJECT("OSG_COMPILESYSTEMLIB")