Browse Source

CMake: install assorted pandatoolbase libraries

rdb 1 year ago
parent
commit
c8390ae7d5

+ 1 - 0
pandatool/CMakeLists.txt

@@ -48,3 +48,4 @@ add_subdirectory(src/xfileegg)
 add_subdirectory(src/xfileprogs)
 
 export_targets(Tools)
+export_targets(ToolsDevel NAMESPACE "Panda3D::Tools::" COMPONENT ToolsDevel)

+ 7 - 2
pandatool/src/converter/CMakeLists.txt

@@ -14,5 +14,10 @@ set(P3CONVERTER_SOURCES
 add_library(p3converter STATIC ${P3CONVERTER_HEADERS} ${P3CONVERTER_SOURCES})
 target_link_libraries(p3converter p3pandatoolbase pandaegg)
 
-# This is only needed for binaries in the pandatool package. It is not useful
-# for user applications, so it is not installed.
+install(TARGETS p3converter
+  EXPORT ToolsDevel COMPONENT ToolsDevel
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d
+  ARCHIVE COMPONENT ToolsDevel)
+install(FILES ${P3CONVERTER_HEADERS} COMPONENT ToolsDevel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d)

+ 7 - 2
pandatool/src/eggbase/CMakeLists.txt

@@ -24,5 +24,10 @@ composite_sources(p3eggbase P3EGGBASE_SOURCES)
 add_library(p3eggbase STATIC ${P3EGGBASE_HEADERS} ${P3EGGBASE_SOURCES})
 target_link_libraries(p3eggbase p3progbase p3converter)
 
-# This is only needed for binaries in the pandatool package. It is not useful
-# for user applications, so it is not installed.
+install(TARGETS p3eggbase
+  EXPORT ToolsDevel COMPONENT ToolsDevel
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d
+  ARCHIVE COMPONENT ToolsDevel)
+install(FILES ${P3EGGBASE_HEADERS} COMPONENT ToolsDevel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d)

+ 7 - 2
pandatool/src/pandatoolbase/CMakeLists.txt

@@ -27,5 +27,10 @@ if(MODULE_TYPE STREQUAL "MODULE")
     INTERFACE_POSITION_INDEPENDENT_CODE ON)
 endif()
 
-# This is only needed for binaries in the pandatool package. It is not useful
-# for user applications, so it is not installed.
+install(TARGETS p3pandatoolbase
+  EXPORT ToolsDevel COMPONENT ToolsDevel
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d
+  ARCHIVE COMPONENT ToolsDevel)
+install(FILES ${P3PANDATOOLBASE_HEADERS} COMPONENT ToolsDevel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d)

+ 7 - 2
pandatool/src/progbase/CMakeLists.txt

@@ -18,5 +18,10 @@ if(IOCTL_TERMINAL_WIDTH)
   target_compile_definitions(p3progbase PRIVATE IOCTL_TERMINAL_WIDTH)
 endif()
 
-# This is only needed for binaries in the pandatool package. It is not useful
-# for user applications, so it is not installed.
+install(TARGETS p3progbase
+  EXPORT ToolsDevel COMPONENT ToolsDevel
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d
+  ARCHIVE COMPONENT ToolsDevel)
+install(FILES ${P3PROGBASE_HEADERS} COMPONENT ToolsDevel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/panda3d)