mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
551 B
17 lines
551 B
![]()
2 years ago
|
# read version
|
||
|
|
||
|
function(set_version version_file output_var)
|
||
|
file(READ "${version_file}" version_data)
|
||
|
|
||
|
string(REGEX MATCH "I2PD_VERSION_MAJOR ([0-9]*)" _ ${version_data})
|
||
|
set(version_major ${CMAKE_MATCH_1})
|
||
|
|
||
|
string(REGEX MATCH "I2PD_VERSION_MINOR ([0-9]*)" _ ${version_data})
|
||
|
set(version_minor ${CMAKE_MATCH_1})
|
||
|
|
||
|
string(REGEX MATCH "I2PD_VERSION_MICRO ([0-9]*)" _ ${version_data})
|
||
|
set(version_micro ${CMAKE_MATCH_1})
|
||
|
|
||
|
set(${output_var} "${version_major}.${version_minor}.${version_micro}" PARENT_SCOPE)
|
||
|
endfunction()
|