From 20d74dad23a3f767c9ce91f9fab215b3150c6152 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Fri, 1 May 2020 04:31:34 +0300 Subject: [PATCH] mdbx-cmake: fix fetch_version macro. Change-Id: Ib1afab6f069da4400cd1103c964c23cc0a0ea03d --- cmake/utils.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index f1f93c2c..25025a44 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -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)