summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBoris Stepanenko <boris.stepanenko@gmail.com>2020-03-16 11:12:18 +0300
committerBoris Stepanenko <boris.stepanenko@gmail.com>2020-03-16 11:12:27 +0300
commit0a74f53fd303d4c84882e946144f2f6a780cc632 (patch)
tree7f99b2760a3f19d0122aad352823f8724fad734a /CMakeLists.txt
parent080a747868c19e91727f925c1bbf9e2c1cae126b (diff)
Added copr RPM build
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7629410..9ec4041 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,8 +145,10 @@ if(NM_WITH_DBUS)
add_definitions(-DNM_WITH_DBUS)
endif()
-execute_process(COMMAND ${CMAKE_SOURCE_DIR}/sh/git_get_version.sh
- ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_TAG_VERSION)
+if(NOT GIT_TAG_VERSION)
+ execute_process(COMMAND ${CMAKE_SOURCE_DIR}/sh/git_get_version.sh
+ ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_TAG_VERSION)
+endif()
if(NOT GIT_TAG_VERSION STREQUAL "")
message(STATUS "Build from git, version:${GIT_TAG_VERSION}")
add_definitions(-DNM_VERSION="${GIT_TAG_VERSION}")