From 95a58809ffc25209413aad70cd1272a74f2b62c0 Mon Sep 17 00:00:00 2001 From: kestred Date: Sun, 19 Jan 2014 15:04:00 -0700 Subject: [PATCH] Add CMakeLists for panda/gobj. Has some compilation issues with vertexDataPage. --- panda/CMakeLists.txt | 2 +- panda/src/gobj/CMakeLists.txt | 2 +- panda/src/gobj/shader.h | 1 + panda/src/gobj/texturePool.cxx | 1 + panda/src/gobj/textureStagePool.cxx | 1 + panda/src/gobj/vertexBufferContext.cxx | 1 + panda/src/gobj/vertexDataBlock.h | 1 + panda/src/gobj/vertexDataBuffer.cxx | 1 + panda/src/gobj/vertexDataPage.cxx | 2 + panda/src/gobj/vertexDataSaveFile.cxx | 1 + panda/src/pgraph/CMakeLists.txt | 215 +++++++++++++++++++++++++ panda/src/pnmimage/CMakeLists.txt | 2 +- panda/src/testbed/CMakeLists.txt | 1 + 13 files changed, 228 insertions(+), 3 deletions(-) create mode 100644 panda/src/pgraph/CMakeLists.txt create mode 100644 panda/src/testbed/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 84d78f05ab..4da1a4306b 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -15,7 +15,7 @@ add_subdirectory(src/mathutil) add_subdirectory(src/gsgbase) add_subdirectory(src/pnmimage) -#add_subdirectory(src/gobj) +add_subdirectory(src/gobj) #add_subdirectory(src/pgraph) #add_subdirectory(src/display) #add_subdirectory(src/framework) diff --git a/panda/src/gobj/CMakeLists.txt b/panda/src/gobj/CMakeLists.txt index fac938a8b6..21c1c6af6b 100644 --- a/panda/src/gobj/CMakeLists.txt +++ b/panda/src/gobj/CMakeLists.txt @@ -151,7 +151,7 @@ endif() composite_sources(p3gobj P3GOBJ_SOURCES) add_library(p3gobj ${P3GOBJ_HEADERS} ${P3GOBJ_SOURCES}) -target_link_libraries(p3gobj p3mathutil p3gsgbase) +target_link_libraries(p3gobj p3gsgbase p3pnmimage) target_interrogate(p3gobj ALL) #begin test_bin_target diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 420fc0ab8f..50249dccaa 100755 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -16,6 +16,7 @@ #define SHADER_H #include "pandabase.h" +#include "config_gobj.h" #include "typedWritableReferenceCount.h" #include "namable.h" #include "graphicsStateGuardianBase.h" diff --git a/panda/src/gobj/texturePool.cxx b/panda/src/gobj/texturePool.cxx index 92cae15cbb..4377767089 100644 --- a/panda/src/gobj/texturePool.cxx +++ b/panda/src/gobj/texturePool.cxx @@ -26,6 +26,7 @@ #include "configVariableList.h" #include "load_dso.h" #include "mutexHolder.h" +#include "dcast.h" TexturePool *TexturePool::_global_ptr; diff --git a/panda/src/gobj/textureStagePool.cxx b/panda/src/gobj/textureStagePool.cxx index fd5e4942e8..413abe19a8 100644 --- a/panda/src/gobj/textureStagePool.cxx +++ b/panda/src/gobj/textureStagePool.cxx @@ -17,6 +17,7 @@ #include "config_gobj.h" #include "mutexHolder.h" #include "configVariableEnum.h" +#include "string_utils.h" TextureStagePool *TextureStagePool::_global_ptr = (TextureStagePool *)NULL; diff --git a/panda/src/gobj/vertexBufferContext.cxx b/panda/src/gobj/vertexBufferContext.cxx index be6e48b980..ca1751bffe 100644 --- a/panda/src/gobj/vertexBufferContext.cxx +++ b/panda/src/gobj/vertexBufferContext.cxx @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include "vertexBufferContext.h" +#include "config_gobj.h" TypeHandle VertexBufferContext::_type_handle; diff --git a/panda/src/gobj/vertexDataBlock.h b/panda/src/gobj/vertexDataBlock.h index 1c485569a4..715c0a0153 100644 --- a/panda/src/gobj/vertexDataBlock.h +++ b/panda/src/gobj/vertexDataBlock.h @@ -17,6 +17,7 @@ #include "pandabase.h" #include "simpleAllocator.h" +#include "vertexDataPage.h" #include "referenceCount.h" class VertexDataPage; diff --git a/panda/src/gobj/vertexDataBuffer.cxx b/panda/src/gobj/vertexDataBuffer.cxx index fbca451608..11bd743b2c 100644 --- a/panda/src/gobj/vertexDataBuffer.cxx +++ b/panda/src/gobj/vertexDataBuffer.cxx @@ -13,6 +13,7 @@ //////////////////////////////////////////////////////////////////// #include "vertexDataBuffer.h" +#include "config_gobj.h" #include "pStatTimer.h" TypeHandle VertexDataBuffer::_type_handle; diff --git a/panda/src/gobj/vertexDataPage.cxx b/panda/src/gobj/vertexDataPage.cxx index dc4c0aabcb..a5255c5503 100644 --- a/panda/src/gobj/vertexDataPage.cxx +++ b/panda/src/gobj/vertexDataPage.cxx @@ -16,8 +16,10 @@ #include "configVariableInt.h" #include "vertexDataSaveFile.h" #include "vertexDataBook.h" +#include "vertexDataBlock.h" #include "pStatTimer.h" #include "memoryHook.h" +#include "config_gobj.h" #ifdef HAVE_ZLIB #include diff --git a/panda/src/gobj/vertexDataSaveFile.cxx b/panda/src/gobj/vertexDataSaveFile.cxx index f3ee44cbb2..22deb2de5d 100644 --- a/panda/src/gobj/vertexDataSaveFile.cxx +++ b/panda/src/gobj/vertexDataSaveFile.cxx @@ -15,6 +15,7 @@ #include "vertexDataSaveFile.h" #include "mutexHolder.h" #include "clockObject.h" +#include "config_gobj.h" #ifndef _WIN32 #include diff --git a/panda/src/pgraph/CMakeLists.txt b/panda/src/pgraph/CMakeLists.txt new file mode 100644 index 0000000000..e3003eea7c --- /dev/null +++ b/panda/src/pgraph/CMakeLists.txt @@ -0,0 +1,215 @@ +set(P3PGRAPH_HEADERS + accumulatedAttribs.I accumulatedAttribs.h + alphaTestAttrib.I alphaTestAttrib.h + antialiasAttrib.I antialiasAttrib.h + attribNodeRegistry.I attribNodeRegistry.h + audioVolumeAttrib.I audioVolumeAttrib.h + auxSceneData.I auxSceneData.h + auxBitplaneAttrib.I auxBitplaneAttrib.h + bamFile.I bamFile.h + billboardEffect.I billboardEffect.h + cacheStats.I cacheStats.h + camera.I camera.h + clipPlaneAttrib.I clipPlaneAttrib.h + colorAttrib.I colorAttrib.h + colorBlendAttrib.I colorBlendAttrib.h + colorScaleAttrib.I colorScaleAttrib.h + colorWriteAttrib.I colorWriteAttrib.h + compassEffect.I compassEffect.h + config_pgraph.h + cullBin.I cullBin.h + cullBinEnums.h + cullBinAttrib.I cullBinAttrib.h + cullBinManager.I cullBinManager.h + cullFaceAttrib.I cullFaceAttrib.h + cullHandler.I cullHandler.h + cullPlanes.I cullPlanes.h + cullResult.I cullResult.h + cullTraverser.I cullTraverser.h + cullTraverserData.I cullTraverserData.h + cullableObject.I cullableObject.h + decalEffect.I decalEffect.h + depthOffsetAttrib.I depthOffsetAttrib.h + depthTestAttrib.I depthTestAttrib.h + depthWriteAttrib.I depthWriteAttrib.h + eventStorePandaNode.I eventStorePandaNode.h + findApproxLevelEntry.I findApproxLevelEntry.h + findApproxPath.I findApproxPath.h + fog.I fog.h + fogAttrib.I fogAttrib.h + geomDrawCallbackData.I geomDrawCallbackData.h + geomNode.I geomNode.h + geomTransformer.I geomTransformer.h + internalNameCollection.I internalNameCollection.h + lensNode.I lensNode.h + light.I light.h + lightAttrib.I lightAttrib.h + lightRampAttrib.I lightRampAttrib.h + loader.I loader.h + loaderFileType.h + loaderFileTypeBam.h + loaderFileTypeRegistry.h + materialAttrib.I materialAttrib.h + materialCollection.I materialCollection.h + modelFlattenRequest.I modelFlattenRequest.h + modelLoadRequest.I modelLoadRequest.h + modelSaveRequest.I modelSaveRequest.h + modelNode.I modelNode.h + modelPool.I modelPool.h + modelRoot.I modelRoot.h + nodePath.I nodePath.h nodePath.cxx + nodePathCollection.I nodePathCollection.h + nodePathComponent.I nodePathComponent.h + occluderEffect.I occluderEffect.h + occluderNode.I occluderNode.h + pandaNode.I pandaNode.h + pandaNodeChain.I pandaNodeChain.h + planeNode.I planeNode.h + polylightEffect.I polylightEffect.h + polylightNode.I polylightNode.h + portalNode.I portalNode.h + portalClipper.I portalClipper.h + renderAttrib.I renderAttrib.h + renderAttribRegistry.I renderAttribRegistry.h + renderEffect.I renderEffect.h + renderEffects.I renderEffects.h + renderModeAttrib.I renderModeAttrib.h + renderState.I renderState.h + rescaleNormalAttrib.I rescaleNormalAttrib.h + sceneGraphReducer.I sceneGraphReducer.h + sceneSetup.I sceneSetup.h + scissorAttrib.I scissorAttrib.h + scissorEffect.I scissorEffect.h + shadeModelAttrib.I shadeModelAttrib.h + shaderAttrib.I shaderAttrib.h + shaderInput.I shaderInput.h + shaderPool.I shaderPool.h + showBoundsEffect.I showBoundsEffect.h + stateMunger.I stateMunger.h + stencilAttrib.I stencilAttrib.h + texMatrixAttrib.I texMatrixAttrib.h + texProjectorEffect.I texProjectorEffect.h + textureAttrib.I textureAttrib.h + texGenAttrib.I texGenAttrib.h + textureStageCollection.I textureStageCollection.h + transformState.I transformState.h + transparencyAttrib.I transparencyAttrib.h + weakNodePath.I weakNodePath.h + workingNodePath.I workingNodePath.h +) + +set(P3PGRAPH_SOURCES + accumulatedAttribs.cxx + alphaTestAttrib.cxx + antialiasAttrib.cxx + attribNodeRegistry.cxx + audioVolumeAttrib.cxx + auxBitplaneAttrib.cxx + auxSceneData.cxx + bamFile.cxx + billboardEffect.cxx + cacheStats.cxx + camera.cxx + clipPlaneAttrib.cxx + colorAttrib.cxx + colorBlendAttrib.cxx + colorScaleAttrib.cxx + colorWriteAttrib.cxx + compassEffect.cxx + config_pgraph.cxx + cullBin.cxx + cullBinAttrib.cxx + cullBinManager.cxx + cullFaceAttrib.cxx + cullHandler.cxx + cullPlanes.cxx + cullResult.cxx + cullTraverser.cxx + cullTraverserData.cxx + cullableObject.cxx + decalEffect.cxx + depthOffsetAttrib.cxx + depthTestAttrib.cxx + depthWriteAttrib.cxx + eventStorePandaNode.cxx + findApproxLevelEntry.cxx + findApproxPath.cxx + fog.cxx + fogAttrib.cxx + geomDrawCallbackData.cxx + geomNode.cxx + geomTransformer.cxx + internalNameCollection.cxx + lensNode.cxx + light.cxx + lightAttrib.cxx + lightRampAttrib.cxx + loader.cxx + loaderFileType.cxx + loaderFileTypeBam.cxx + loaderFileTypeRegistry.cxx + materialAttrib.cxx + materialCollection.cxx + modelFlattenRequest.cxx + modelLoadRequest.cxx + modelSaveRequest.cxx + modelNode.cxx + modelPool.cxx + modelRoot.cxx + nodePathCollection.cxx + nodePathComponent.cxx + occluderEffect.cxx + occluderNode.cxx + pandaNode.cxx + pandaNodeChain.cxx + planeNode.cxx + polylightEffect.cxx + polylightNode.cxx + portalNode.cxx + portalClipper.cxx + renderAttrib.cxx + renderAttribRegistry.cxx + renderEffect.cxx + renderEffects.cxx + renderModeAttrib.cxx + renderState.cxx + rescaleNormalAttrib.cxx + sceneGraphReducer.cxx + sceneSetup.cxx + scissorAttrib.cxx + scissorEffect.cxx + shadeModelAttrib.cxx + shaderAttrib.cxx + shaderInput.cxx + shaderPool.cxx + showBoundsEffect.cxx + stateMunger.cxx + stencilAttrib.cxx + texMatrixAttrib.cxx + texProjectorEffect.cxx + textureAttrib.cxx + texGenAttrib.cxx + textureStageCollection.cxx + transformState.cxx + transparencyAttrib.cxx + weakNodePath.cxx + workingNodePath.cxx +) + +composite_sources(p3pgraph P3PGRAPH_SOURCES) +add_library(p3pgraph ${P3PGRAPH_HEADERS} ${P3PGRAPH_SOURCES}) +target_link_libraries(p3pgraph) #p3gobj +target_interrogate(p3pgraph ALL) + # p3gobj p3event p3gsgbase p3putil p3linmath p3downloader + + +#begin test_bin_target + #define TARGET test_pgraph + + #define SOURCES + # test_pgraph.cxx + + #define LOCAL_LIBS $[LOCAL_LIBS] p3pgraph + #define OTHER_LIBS $[OTHER_LIBS] p3pystub + +#end test_bin_target diff --git a/panda/src/pnmimage/CMakeLists.txt b/panda/src/pnmimage/CMakeLists.txt index aea7e8716f..fd95838222 100644 --- a/panda/src/pnmimage/CMakeLists.txt +++ b/panda/src/pnmimage/CMakeLists.txt @@ -31,4 +31,4 @@ endif() composite_sources(p3pnmimage P3PNMIMAGE_SOURCES) add_library(p3pnmimage ${P3PNMIMAGE_HEADERS} ${P3PNMIMAGE_SOURCES}) target_link_libraries(p3pnmimage p3mathutil) -target_interrogate(p3pnmimage ALL) \ No newline at end of file +target_interrogate(p3pnmimage ALL) diff --git a/panda/src/testbed/CMakeLists.txt b/panda/src/testbed/CMakeLists.txt new file mode 100644 index 0000000000..c632347b29 --- /dev/null +++ b/panda/src/testbed/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(pview pview.cxx) \ No newline at end of file