diff --git a/CMakeLists.txt b/CMakeLists.txt index fccef3ea18..d1755b6919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ include_directories("${CMAKE_BINARY_DIR}/include") option(BUILD_DTOOL "Build the dtool source tree." ON) option(BUILD_PANDA "Build the panda source tree." ON) option(BUILD_DIRECT "Build the direct source tree." ON) +option(BUILD_PANDATOOL "Build the pandatool source tree." ON) # Include Panda3D packages if(BUILD_DTOOL) @@ -44,3 +45,7 @@ endif() if(BUILD_DIRECT) add_subdirectory(direct) endif() + +if(BUILD_PANDATOOL) + add_subdirectory(pandatool) +endif() diff --git a/pandatool/CMakeLists.txt b/pandatool/CMakeLists.txt new file mode 100644 index 0000000000..785a35bdb1 --- /dev/null +++ b/pandatool/CMakeLists.txt @@ -0,0 +1,7 @@ +if(NOT BUILD_PANDA) + message(FATAL_ERROR "Cannot build pandatool without panda! Please enable the BUILD_PANDA option.") +endif() + +# Include pandatool source directories +add_subdirectory(src/pandatoolbase) +add_subdirectory(src/progbase) diff --git a/pandatool/src/pandatoolbase/CMakeLists.txt b/pandatool/src/pandatoolbase/CMakeLists.txt new file mode 100644 index 0000000000..d4a7aff55a --- /dev/null +++ b/pandatool/src/pandatoolbase/CMakeLists.txt @@ -0,0 +1,22 @@ +set(P3PANDATOOLBASE_HEADERS + animationConvert.h + config_pandatoolbase.h + distanceUnit.h + pandatoolbase.h pandatoolsymbols.h + pathReplace.I pathReplace.h + pathStore.h) + +set(P3PANDATOOLBASE_SOURCES + animationConvert.cxx + config_pandatoolbase.cxx + distanceUnit.cxx + pandatoolbase.cxx + pathReplace.cxx + pathStore.cxx) + +composite_sources(p3pandatoolbase P3PANDATOOLBASE_SOURCES) +add_library(p3pandatoolbase STATIC ${P3PANDATOOLBASE_HEADERS} ${P3PANDATOOLBASE_SOURCES}) +target_link_libraries(p3pandatoolbase p3pandabase p3putil) + +# This is only needed for binaries in the pandatool package. It is not useful +# for user applications, so it is not installed. diff --git a/pandatool/src/progbase/CMakeLists.txt b/pandatool/src/progbase/CMakeLists.txt new file mode 100644 index 0000000000..8b245f2b2d --- /dev/null +++ b/pandatool/src/progbase/CMakeLists.txt @@ -0,0 +1,17 @@ +set(P3PROGBASE_HEADERS + programBase.I programBase.h + withOutputFile.I withOutputFile.h + wordWrapStream.h wordWrapStreamBuf.I + wordWrapStreamBuf.h) + +set(P3PROGBASE_SOURCES + programBase.cxx withOutputFile.cxx wordWrapStream.cxx + wordWrapStreamBuf.cxx) + +composite_sources(p3progbase P3PROGBASE_SOURCES) +add_library(p3progbase STATIC ${P3PROGBASE_HEADERS} ${P3PROGBASE_SOURCES}) +target_link_libraries(p3progbase p3pandatoolbase p3pnmimage) +target_use_packages(p3progbase ZLIB) + +# This is only needed for binaries in the pandatool package. It is not useful +# for user applications, so it is not installed.