mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
decouple version-sync script from cmake
This commit is contained in:
parent
3520eee05d
commit
86e67f805a
|
@ -17,19 +17,6 @@ set(PROJECT_VERSION_MINOR "1")
|
|||
set(PROJECT_VERSION_PATCH "4")
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
|
||||
# Update versions in various places
|
||||
# This must be run before setting SOVERSION, because SOVERSION is read from
|
||||
# a file generated by this script
|
||||
find_program(SHELL NAMES sh dash bash zsh)
|
||||
if(SHELL)
|
||||
execute_process(
|
||||
COMMAND ${SHELL} ${toxcore_SOURCE_DIR}/other/version-sync
|
||||
${toxcore_SOURCE_DIR}
|
||||
${PROJECT_VERSION_MAJOR}
|
||||
${PROJECT_VERSION_MINOR}
|
||||
${PROJECT_VERSION_PATCH})
|
||||
endif()
|
||||
|
||||
# set .so library version / following libtool scheme
|
||||
# https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
|
||||
file(STRINGS ${toxcore_SOURCE_DIR}/so.version SOVERSION_CURRENT REGEX "^CURRENT=[0-9]+$")
|
||||
|
|
|
@ -29,6 +29,10 @@ update 'toxcore/tox.api.h' 's/\(const VERSION_MAJOR *= \).*;/\1'$MAJOR';/'
|
|||
update 'toxcore/tox.api.h' 's/\(const VERSION_MINOR *= \).*;/\1'$MINOR';/'
|
||||
update 'toxcore/tox.api.h' 's/\(const VERSION_PATCH *= \).*;/\1'$PATCH';/'
|
||||
|
||||
update 'CMakeLists.txt' 's/\(PROJECT_VERSION_MAJOR "\).*"/\1'$MAJOR'"/'
|
||||
update 'CMakeLists.txt' 's/\(PROJECT_VERSION_MINOR "\).*"/\1'$MINOR'"/'
|
||||
update 'CMakeLists.txt' 's/\(PROJECT_VERSION_PATCH "\).*"/\1'$PATCH'"/'
|
||||
|
||||
#
|
||||
# calculating the SO version
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user