mirror of
https://github.com/triqs/dft_tools
synced 2024-12-23 04:43:42 +01:00
[cmake] Define version numbers explicitly
This commit is contained in:
parent
50c1ce40a5
commit
da10fdeb55
@ -34,15 +34,11 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR (NOT IS_ABSOLUTE ${CMAKE_INSTA
|
||||
endif()
|
||||
message(STATUS "-------- INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
|
||||
|
||||
# Use git to detect app4triqs version and git hash
|
||||
execute_process(COMMAND bash "-c" "${TRIQS_GIT_EXECUTABLE} describe | sed \"s/-\\([0-9]*\\)-.*/.\\1/g\""
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE APP4TRIQS_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT APP4TRIQS_VERSION)
|
||||
set(APP4TRIQS_VERSION 0.1)
|
||||
endif()
|
||||
# Define the app4triqs version numbers and get the git hash
|
||||
set(APP4TRIQS_VERSION_MAJOR 0)
|
||||
set(APP4TRIQS_VERSION_MINOR 1)
|
||||
set(APP4TRIQS_VERSION_PATCH 0)
|
||||
set(APP4TRIQS_VERSION ${APP4TRIQS_VERSION_MAJOR}.${APP4TRIQS_VERSION_MINOR}.${APP4TRIQS_VERSION_PATCH})
|
||||
triqs_get_git_hash_of_source_dir(APP4TRIQS_GIT_HASH)
|
||||
message(STATUS "app4triqs version : ${APP4TRIQS_VERSION}")
|
||||
message(STATUS "Git hash: ${APP4TRIQS_GIT_HASH}")
|
||||
@ -84,7 +80,7 @@ if(BUILD_DEBIAN_PACKAGE)
|
||||
SET(CPACK_PACKAGE_VERSION ${APP4TRIQS_VERSION})
|
||||
SET(CPACK_PACKAGE_CONTACT "https://github.com/TRIQS/app4triqs")
|
||||
EXECUTE_PROCESS(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CMAKE_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "triqs (>= 1.5)")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "triqs (>= 2.1)")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
|
||||
INCLUDE(CPack)
|
||||
|
Loading…
Reference in New Issue
Block a user