Browse Source

CMake: Add separate BUILD_TOOLS option to build binaries

This is separate from BUILD_PANDATOOL, which builds the pandatool tree
rdb 1 year ago
parent
commit
4ca495d828

+ 1 - 0
CMakeLists.txt

@@ -109,6 +109,7 @@ option(BUILD_DIRECT "Build the direct source tree." ON)
 option(BUILD_PANDATOOL "Build the pandatool source tree." ON)
 option(BUILD_PANDATOOL "Build the pandatool source tree." ON)
 option(BUILD_CONTRIB "Build the contrib source tree." ON)
 option(BUILD_CONTRIB "Build the contrib source tree." ON)
 option(BUILD_MODELS "Build/install the built-in models." ON)
 option(BUILD_MODELS "Build/install the built-in models." ON)
+option(BUILD_TOOLS "Build binary tools." ON)
 
 
 # Include Panda3D packages
 # Include Panda3D packages
 if(BUILD_DTOOL)
 if(BUILD_DTOOL)

+ 4 - 0
direct/src/dcparse/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(p3dcparse dcparse.cxx)
 add_executable(p3dcparse dcparse.cxx)
 target_link_libraries(p3dcparse p3direct)
 target_link_libraries(p3dcparse p3direct)
 install(TARGETS p3dcparse EXPORT Direct COMPONENT Direct DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS p3dcparse EXPORT Direct COMPONENT Direct DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 1 - 3
panda/src/downloadertools/CMakeLists.txt

@@ -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.
+if(NOT BUILD_TOOLS)
   return()
   return()
 endif()
 endif()
 
 

+ 1 - 3
panda/src/testbed/CMakeLists.txt

@@ -1,6 +1,4 @@
-if(NOT BUILD_PANDATOOL)
-  # It's safe to say, if the user doesn't want pandatool, they don't want pview
-  # either.
+if(NOT BUILD_TOOLS)
   return()
   return()
 endif()
 endif()
 
 

+ 4 - 0
pandatool/src/bam/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(bam-info bamInfo.cxx bamInfo.h)
 add_executable(bam-info bamInfo.cxx bamInfo.h)
 target_link_libraries(bam-info p3progbase panda)
 target_link_libraries(bam-info p3progbase panda)
 install(TARGETS bam-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS bam-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/daeprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(HAVE_EGG AND HAVE_FCOLLADA)
 if(HAVE_EGG AND HAVE_FCOLLADA)
 
 
   add_executable(dae2egg daeToEgg.cxx daeToEgg.h)
   add_executable(dae2egg daeToEgg.cxx daeToEgg.h)

+ 4 - 0
pandatool/src/dxfprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(dxf-points dxfPoints.cxx dxfPoints.h)
 add_executable(dxf-points dxfPoints.cxx dxfPoints.h)
 target_link_libraries(dxf-points p3progbase p3dxf)
 target_link_libraries(dxf-points p3progbase p3dxf)
 install(TARGETS dxf-points EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS dxf-points EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/egg-mkfont/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG OR NOT HAVE_FREETYPE)
 if(NOT HAVE_EGG OR NOT HAVE_FREETYPE)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/egg-optchar/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG)
 if(NOT HAVE_EGG)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/egg-palettize/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG)
 if(NOT HAVE_EGG)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/egg-qtess/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG)
 if(NOT HAVE_EGG)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/eggprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG)
 if(NOT HAVE_EGG)
   return()
   return()
 endif()
 endif()

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

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(flt-info fltInfo.cxx fltInfo.h)
 add_executable(flt-info fltInfo.cxx fltInfo.h)
 target_link_libraries(flt-info p3progbase p3flt)
 target_link_libraries(flt-info p3progbase p3flt)
 install(TARGETS flt-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS flt-info EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/gtk-stats/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_GTK3 OR NOT HAVE_NET)
 if(NOT HAVE_GTK3 OR NOT HAVE_NET)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/imageprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(image-fix-hidden-color imageFixHiddenColor.cxx imageFixHiddenColor.h)
 add_executable(image-fix-hidden-color imageFixHiddenColor.cxx imageFixHiddenColor.h)
 target_link_libraries(image-fix-hidden-color p3imagebase)
 target_link_libraries(image-fix-hidden-color p3imagebase)
 install(TARGETS image-fix-hidden-color EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS image-fix-hidden-color EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/lwoprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(lwo-scan lwoScan.cxx lwoScan.h)
 add_executable(lwo-scan lwoScan.cxx lwoScan.h)
 target_link_libraries(lwo-scan p3progbase p3lwo)
 target_link_libraries(lwo-scan p3progbase p3lwo)
 install(TARGETS lwo-scan EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS lwo-scan EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/mac-stats/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT APPLE OR NOT HAVE_NET)
 if(NOT APPLE OR NOT HAVE_NET)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/miscprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(bin2c binToC.cxx binToC.h)
 add_executable(bin2c binToC.cxx binToC.h)
 target_link_libraries(bin2c p3progbase)
 target_link_libraries(bin2c p3progbase)
 install(TARGETS bin2c EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS bin2c EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/objprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_EGG)
 if(NOT HAVE_EGG)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/pfmprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(pfm-bba
 add_executable(pfm-bba
   config_pfmprogs.cxx config_pfmprogs.h
   config_pfmprogs.cxx config_pfmprogs.h
   pfmBba.cxx pfmBba.h)
   pfmBba.cxx pfmBba.h)

+ 4 - 0
pandatool/src/pstatserver/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_NET)
 if(NOT HAVE_NET)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/text-stats/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT HAVE_NET)
 if(NOT HAVE_NET)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/vrmlprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(vrml-trans vrmlTrans.cxx vrmlTrans.h)
 add_executable(vrml-trans vrmlTrans.cxx vrmlTrans.h)
 target_link_libraries(vrml-trans p3progbase p3vrml)
 target_link_libraries(vrml-trans p3progbase p3vrml)
 install(TARGETS vrml-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS vrml-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})

+ 4 - 0
pandatool/src/win-stats/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 if(NOT WIN32 OR NOT HAVE_NET)
 if(NOT WIN32 OR NOT HAVE_NET)
   return()
   return()
 endif()
 endif()

+ 4 - 0
pandatool/src/xfileprogs/CMakeLists.txt

@@ -1,3 +1,7 @@
+if(NOT BUILD_TOOLS)
+  return()
+endif()
+
 add_executable(x-trans xFileTrans.cxx xFileTrans.h)
 add_executable(x-trans xFileTrans.cxx xFileTrans.h)
 target_link_libraries(x-trans p3progbase p3xfile)
 target_link_libraries(x-trans p3progbase p3xfile)
 install(TARGETS x-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})
 install(TARGETS x-trans EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})