Skip to content

Commit

Permalink
Calibrate CPACK_PACKAGE_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhichang committed Jul 1, 2024
1 parent 6c7b135 commit ce76fc5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ endif ()

# CPack settings
set(CPACK_PACKAGE_NAME "infinity")
if(NOT DEFINED CPACK_PACKAGE_VERSION)
# dpkg requires version to be starting with number
if(DEFINED CPACK_PACKAGE_VERSION)
string(REGEX REPLACE "^[^0-9]+" "" CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
string(REPLACE "-" "." CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
endif()
if(NOT DEFINED CPACK_PACKAGE_VERSION OR CPACK_PACKAGE_VERSION STREQUAL "")
set(CPACK_PACKAGE_VERSION "0.2.1")
endif()
set(CPACK_PACKAGE_RELEASE 1)
Expand Down

0 comments on commit ce76fc5

Please sign in to comment.