Browse Source

CMake: Build FLT programs

Sam Edwards 8 years ago
parent
commit
cbbfbfd0bb

+ 4 - 0
pandatool/CMakeLists.txt

@@ -6,7 +6,11 @@ endif()
 add_subdirectory(src/pandatoolbase)
 add_subdirectory(src/progbase)
 add_subdirectory(src/converter)
+add_subdirectory(src/cvscopy)
 add_subdirectory(src/eggbase)
 add_subdirectory(src/bam)
+add_subdirectory(src/flt)
+add_subdirectory(src/fltegg)
+add_subdirectory(src/fltprogs)
 add_subdirectory(src/pstatserver)
 add_subdirectory(src/gtk-stats)

+ 11 - 0
pandatool/src/cvscopy/CMakeLists.txt

@@ -0,0 +1,11 @@
+set(P3CVSCOPY_HEADERS
+    cvsCopy.h cvsSourceDirectory.h cvsSourceTree.h)
+
+set(P3CVSCOPY_SOURCES
+    cvsCopy.cxx cvsSourceDirectory.cxx cvsSourceTree.cxx)
+
+add_library(p3cvscopy STATIC ${P3CVSCOPY_HEADERS} ${P3CVSCOPY_SOURCES})
+target_link_libraries(p3cvscopy p3progbase)
+
+# This is only needed for binaries in the pandatool package. It is not useful
+# for user applications, so it is not installed.

+ 85 - 0
pandatool/src/flt/CMakeLists.txt

@@ -0,0 +1,85 @@
+set(P3FLT_HEADERS
+    config_flt.h
+    fltBead.h
+    fltBeadID.h
+    fltCurve.I fltCurve.h
+    fltError.h
+    fltExternalReference.h
+    fltEyepoint.h
+    fltFace.I fltFace.h
+    fltGeometry.I fltGeometry.h
+    fltGroup.h
+    fltHeader.h
+    fltInstanceDefinition.h
+    fltInstanceRef.h
+    fltLightSourceDefinition.h
+    fltLocalVertexPool.I fltLocalVertexPool.h
+    fltLOD.h
+    fltMaterial.h
+    fltMesh.I fltMesh.h
+    fltMeshPrimitive.I fltMeshPrimitive.h
+    fltObject.h
+    fltOpcode.h
+    fltPackedColor.I fltPackedColor.h
+    fltRecord.I fltRecord.h
+    fltRecordReader.h
+    fltRecordWriter.h
+    fltTexture.h
+    fltTrackplane.h
+    fltTransformGeneralMatrix.h
+    fltTransformPut.h
+    fltTransformRecord.h
+    fltTransformRotateAboutEdge.h
+    fltTransformRotateAboutPoint.h
+    fltTransformRotateScale.h
+    fltTransformScale.h
+    fltTransformTranslate.h
+    fltUnsupportedRecord.h
+    fltVectorRecord.h
+    fltVertex.I fltVertex.h
+    fltVertexList.h)
+
+set(P3FLT_SOURCES
+    config_flt.cxx
+    fltBead.cxx
+    fltBeadID.cxx
+    fltCurve.cxx
+    fltError.cxx
+    fltExternalReference.cxx
+    fltEyepoint.cxx
+    fltFace.cxx
+    fltGeometry.cxx
+    fltGroup.cxx
+    fltHeader.cxx
+    fltInstanceDefinition.cxx
+    fltInstanceRef.cxx
+    fltLightSourceDefinition.cxx
+    fltLocalVertexPool.cxx
+    fltLOD.cxx
+    fltMaterial.cxx
+    fltMesh.cxx
+    fltMeshPrimitive.cxx
+    fltObject.cxx
+    fltOpcode.cxx
+    fltPackedColor.cxx
+    fltRecord.cxx
+    fltRecordReader.cxx
+    fltRecordWriter.cxx
+    fltTexture.cxx
+    fltTrackplane.cxx
+    fltTransformGeneralMatrix.cxx
+    fltTransformPut.cxx
+    fltTransformRecord.cxx
+    fltTransformRotateAboutEdge.cxx
+    fltTransformRotateAboutPoint.cxx
+    fltTransformRotateScale.cxx
+    fltTransformScale.cxx
+    fltTransformTranslate.cxx
+    fltUnsupportedRecord.cxx
+    fltVectorRecord.cxx
+    fltVertex.cxx
+    fltVertexList.cxx)
+
+composite_sources(p3flt P3FLT_SOURCES)
+add_library(p3flt STATIC ${P3FLT_HEADERS} ${P3FLT_SOURCES})
+target_link_libraries(p3flt p3pandatoolbase p3mathutil)

+ 13 - 0
pandatool/src/fltegg/CMakeLists.txt

@@ -0,0 +1,13 @@
+set(P3FLTEGG_HEADERS
+    fltToEggConverter.I fltToEggConverter.h
+    fltToEggLevelState.I fltToEggLevelState.h)
+  
+set(P3FLTEGG_SOURCES
+    fltToEggConverter.cxx
+    fltToEggLevelState.cxx)
+
+add_library(p3fltegg STATIC ${P3FLTEGG_HEADERS} ${P3FLTEGG_SOURCES})
+target_link_libraries(p3fltegg p3flt p3converter)
+
+# This is only needed for binaries in the pandatool package. It is not useful
+# for user applications, so it is not installed.

+ 19 - 0
pandatool/src/fltprogs/CMakeLists.txt

@@ -0,0 +1,19 @@
+add_executable(flt-info fltInfo.cxx fltInfo.h)
+target_link_libraries(flt-info p3progbase p3flt)
+install(TARGETS flt-info DESTINATION bin)
+
+add_executable(flt-trans fltTrans.cxx fltTrans.h)
+target_link_libraries(flt-trans p3progbase p3flt)
+install(TARGETS flt-trans DESTINATION bin)
+
+add_executable(fltcopy fltCopy.cxx fltCopy.h)
+target_link_libraries(fltcopy p3progbase p3cvscopy p3flt)
+install(TARGETS fltcopy DESTINATION bin)
+
+add_executable(egg2flt eggToFlt.cxx eggToFlt.h)
+target_link_libraries(egg2flt p3fltegg p3eggbase p3progbase)
+install(TARGETS egg2flt DESTINATION bin)
+
+add_executable(flt2egg fltToEgg.cxx fltToEgg.h)
+target_link_libraries(flt2egg p3fltegg p3eggbase p3progbase)
+install(TARGETS flt2egg DESTINATION bin)