From 86a708cee548ddd6ffc2bce4f8053ef7dddacd72 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 11 Feb 2021 09:56:43 -0600 Subject: [PATCH] cmake: Allow overriding package version --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cb346562..40c327b1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,10 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers") include(CMakeDependentOption) include(SPIR-V) include(GNUInstallDirs) -include(GetGitRevisionDescription) -git_describe(GIT_DESC "--always") +if(NOT GIT_DESC) + include(GetGitRevisionDescription) + git_describe(GIT_DESC "--always") +endif() if(NOT ${CMAKE_VERSION} VERSION_LESS 3.9) include(CheckIPOSupported) check_ipo_supported(RESULT HAS_IPO)