summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-08 14:18:29 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-08-08 14:18:29 +0300
commit04e477688697a5a792f499eeb2e5a919146bc3f4 (patch)
treeb8573d5dc45b0b297473582486607dd36a5ef51f
parentUse archives instead of repos to fetch dependencies (diff)
downloadnheko-04e477688697a5a792f499eeb2e5a919146bc3f4.tar.xz
Remove dash from version string when building outside of git
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index c47c1674..365304a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -126,7 +126,11 @@ if(GIT) COMMAND ${GIT} rev-parse --short HEAD OUTPUT_VARIABLE GIT_OUT OUTPUT_STRIP_TRAILING_WHITESPACE ) - set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${GIT_OUT}") + if(GIT_OUT) + set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${GIT_OUT}") + else() + set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}") + endif() endif(GIT) set(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})