summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/TDEVersion.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/TDEVersion.cmake b/modules/TDEVersion.cmake
index 689eff6..f9c281a 100644
--- a/modules/TDEVersion.cmake
+++ b/modules/TDEVersion.cmake
@@ -19,8 +19,11 @@ macro( tde_set_project_version )
unset( VERSION )
- file( STRINGS ${CMAKE_SOURCE_DIR}/.tdescminfo VERSION_STRING REGEX "^Version:.+$" )
- string( REGEX REPLACE "^Version: ([0-9]+\.[0-9]+\.[0-9]+.*)$" "\\1" VERSION "${VERSION_STRING}" )
+ if( EXISTS ${CMAKE_SOURCE_DIR}/.tdescminfo )
+ file( STRINGS ${CMAKE_SOURCE_DIR}/.tdescminfo VERSION_STRING REGEX "^Version:.+$" )
+ string( REGEX REPLACE "^Version: ([0-9]+\.[0-9]+\.[0-9]+.*)$" "\\1" VERSION "${VERSION_STRING}" )
+ endif()
+
if( NOT VERSION )
set( VERSION "${DEFAULT_VERSION}" )
endif()