diff --git a/CMakeLists.txt b/CMakeLists.txt index e5722ad7..aaee0530 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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]+$") diff --git a/other/version-sync b/other/version-sync index fdfe91d9..fa408c2d 100755 --- a/other/version-sync +++ b/other/version-sync @@ -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 #