From: Daniel Elstner Date: Sat, 25 Jul 2015 20:31:05 +0000 (+0200) Subject: build: Only try to read the VERSION file if it exists X-Git-Tag: pulseview-0.3.0~160 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=53a69fd4e21c9a872a265626b00a20365c49076f;ds=sidebyside build: Only try to read the VERSION file if it exists --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b521443..800ffe27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ set(PV_VERSION_STRING "0.3.0") include(GetGitRevisionDescription) git_describe(PV_TAG_VERSION_STRING --tags --dirty) -if(NOT PV_TAG_VERSION_STRING) +if(NOT PV_TAG_VERSION_STRING AND EXISTS "${PROJECT_SOURCE_DIR}/VERSION") # Read the version from a file that is distributed with # the source package (see writepackageversion.cmake). file(STRINGS "${PROJECT_SOURCE_DIR}/VERSION" PV_TAG_VERSION_STRING LIMIT_COUNT 1)