cmake: Begin work on building pandatool.
This commit is contained in:
parent
9d1254d440
commit
8524676032
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
Loading…
Reference in New Issue