mdbx-cmake: fix fetch_version macro.

Change-Id: Ib1afab6f069da4400cd1103c964c23cc0a0ea03d
This commit is contained in:
Leonid Yuriev 2020-05-01 04:31:34 +03:00
parent 9922d3337e
commit 20d74dad23

View File

@ -145,8 +145,9 @@ macro(fetch_version name source_root_directory parent_scope)
set(${name}_GIT_REVISION 0)
# Try to get version from VERSION file
if(EXISTS "${version_file}/VERSION")
file(STRINGS "${version_file}/VERSION" ${name}_VERSION)
set(version_file "${source_root_directory}/VERSION")
if(EXISTS "${version_file}")
file(STRINGS "${version_file}" ${name}_VERSION LIMIT_COUNT 1 LIMIT_INPUT 42)
endif()
if(NOT ${name}_VERSION)