This is separate from BUILD_PANDATOOL, which builds the pandatool tree
@@ -109,6 +109,7 @@ option(BUILD_DIRECT "Build the direct source tree." ON)
option(BUILD_PANDATOOL "Build the pandatool source tree." ON)
option(BUILD_CONTRIB "Build the contrib source tree." ON)
option(BUILD_MODELS "Build/install the built-in models." ON)
+option(BUILD_TOOLS "Build binary tools." ON)
# Include Panda3D packages
if(BUILD_DTOOL)
@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+ return()
+endif()
+
add_executable(p3dcparse dcparse.cxx)
target_link_libraries(p3dcparse p3direct)
install(TARGETS p3dcparse EXPORT Direct COMPONENT Direct DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -1,6 +1,4 @@
-if(NOT BUILD_PANDATOOL)
- # It's safe to say, if the user doesn't want pandatool, they don't want these
- # tools either.
return()
endif()
- # It's safe to say, if the user doesn't want pandatool, they don't want pview
- # either.
add_executable(bam-info bamInfo.cxx bamInfo.h)
target_link_libraries(bam-info p3progbase panda)
install(TARGETS bam-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
if(HAVE_EGG AND HAVE_FCOLLADA)
add_executable(dae2egg daeToEgg.cxx daeToEgg.h)
add_executable(dxf-points dxfPoints.cxx dxfPoints.h)
target_link_libraries(dxf-points p3progbase p3dxf)
install(TARGETS dxf-points EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT HAVE_EGG OR NOT HAVE_FREETYPE)
if(NOT HAVE_EGG)
add_executable(flt-info fltInfo.cxx fltInfo.h)
target_link_libraries(flt-info p3progbase p3flt)
install(TARGETS flt-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT HAVE_GTK3 OR NOT HAVE_NET)
add_executable(image-fix-hidden-color imageFixHiddenColor.cxx imageFixHiddenColor.h)
target_link_libraries(image-fix-hidden-color p3imagebase)
install(TARGETS image-fix-hidden-color EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(lwo-scan lwoScan.cxx lwoScan.h)
target_link_libraries(lwo-scan p3progbase p3lwo)
install(TARGETS lwo-scan EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT APPLE OR NOT HAVE_NET)
add_executable(bin2c binToC.cxx binToC.h)
target_link_libraries(bin2c p3progbase)
install(TARGETS bin2c EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(pfm-bba
config_pfmprogs.cxx config_pfmprogs.h
pfmBba.cxx pfmBba.h)
if(NOT HAVE_NET)
add_executable(vrml-trans vrmlTrans.cxx vrmlTrans.h)
target_link_libraries(vrml-trans p3progbase p3vrml)
install(TARGETS vrml-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT WIN32 OR NOT HAVE_NET)
add_executable(x-trans xFileTrans.cxx xFileTrans.h)
target_link_libraries(x-trans p3progbase p3xfile)
install(TARGETS x-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})