feat(src/CMakeLists.txt): add cpack support for Debian package
This commit is contained in:
parent
c7f1e3737f
commit
e8d894473e
1 changed files with 21 additions and 11 deletions
|
@ -263,17 +263,6 @@ ENDIF()
|
|||
# Python
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
# CPack
|
||||
set(CPACK_PACKAGE_NAME lean)
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} LOWER_SYSTEM_NAME)
|
||||
set(CPACK_PACKAGE_FILE_NAME "lean-${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}-${LOWER_SYSTEM_NAME}")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(CPACK_GENERATOR TGZ)
|
||||
else()
|
||||
SET(CPACK_GENERATOR ZIP)
|
||||
endif()
|
||||
include(CPack)
|
||||
|
||||
# Examples
|
||||
file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/../examples/*.lean")
|
||||
FOREACH(FILE ${LEANLIB})
|
||||
|
@ -473,3 +462,24 @@ if("${INCLUDE_MSYS2_DLLS}" MATCHES "ON")
|
|||
${MINGW_LOCAL_DIR}/ninja.exe)
|
||||
install(PROGRAMS ${RUNTIME_LIBRARIES} DESTINATION bin)
|
||||
endif()
|
||||
|
||||
# CPack
|
||||
set(CPACK_PACKAGE_NAME lean)
|
||||
set(CPACK_PACKAGE_CONTACT "Leonardo de Moura <leodemoura@microsoft.com>")
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} LOWER_SYSTEM_NAME)
|
||||
string(TIMESTAMP COMPILE_DATETIME "%Y%m%d%H%M%S")
|
||||
set(CPACK_PACKAGE_VERSION "${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}.${COMPILE_DATETIME}")
|
||||
if(NOT (${GIT_SHA1} MATCHES "GITDIR-NOTFOUND"))
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.git${GIT_SHA1}")
|
||||
endif()
|
||||
set(CPACK_PACKAGE_FILE_NAME "lean-${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}-${LOWER_SYSTEM_NAME}")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(CPACK_GENERATOR TGZ)
|
||||
else()
|
||||
SET(CPACK_GENERATOR ZIP)
|
||||
endif()
|
||||
# CPack -- Debian
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "python")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Lean Theorem Prover")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
include(CPack)
|
||||
|
|
Loading…
Reference in a new issue