CMake: install assorted pandatoolbase libraries

This commit is contained in:
rdb 2024-08-12 16:32:24 +02:00
parent 243d59bf37
commit c8390ae7d5
5 changed files with 29 additions and 8 deletions

View File

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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)