cmake: add missing files + remove CMakeCPack + add librw::librw target ALIAS

This commit is contained in:
Anonymous Maarten 2020-11-30 19:26:09 +01:00
parent efc0c307d7
commit 4e13e65b1c
3 changed files with 13 additions and 18 deletions

View File

@ -1,15 +0,0 @@
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A (partial) re-implementation of RenderWare Graphics")
set(CPACK_PACKAGE_VENDOR "librw")
# FIXME: better description of the project
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
# set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCPackOptions.cmake")
include(CPack)

View File

@ -49,9 +49,16 @@ if(LIBRW_INSTALL)
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(
EXPORT librw-targets
EXPORT librw-targets NAMESPACE librw::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
include(CMakeCPack.cmake)
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A (partial) re-implementation of RenderWare Graphics")
set(CPACK_PACKAGE_VENDOR "aap")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
include(CPack)
endif()

View File

@ -99,6 +99,7 @@ add_library(librw
ps2/rwps2impl.h
ps2/rwps2plg.h
)
add_library(librw::librw ALIAS librw)
target_include_directories(librw
INTERFACE
@ -174,6 +175,7 @@ if(LIBRW_INSTALL)
FILES
base.err
rwbase.h
rwcharset.h
rwerror.h
rwplg.h
rwrender.h
@ -203,6 +205,7 @@ if(LIBRW_INSTALL)
FILES
gl/rwwdgl.h
gl/rwgl3.h
gl/rwgl3plg.h
gl/rwgl3shader.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/gl"
)