Skip to content

Commit

Permalink
cmake: use cpack to create archives
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Jun 8, 2018
1 parent e3c0b00 commit 2da3660
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CMakeCPack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenRW 'Open ReWrite' is an un-official open source recreation of the classic Grand Theft Auto III game executable")
set(CPACK_PACKAGE_VENDOR "openrw")

# FIXME: better description of the project
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
string(SUBSTRING "${GIT_SHA1}" 0 8 GIT_SHA1_SHORT)
set(CPACK_PACKAGE_VERSION "${GIT_SHA1_SHORT}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${GIT_SHA1_SHORT}")

set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${GIT_SHA1_SHORT}")

# set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCPackOptions.cmake")

include(CPack)
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ install(FILES COPYING
file(COPY COPYING
DESTINATION "${PROJECT_BINARY_DIR}"
)

include(CMakeCPack.cmake)

0 comments on commit 2da3660

Please sign in to comment.