diff options
author | kcat <[email protected]> | 2020-04-05 00:02:54 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-05 00:02:54 -0700 |
commit | de2599b70b8811233c3bceff6076156c739e02a5 (patch) | |
tree | 141e290adc243cc315d4f73406f09170c6f6cec8 /CMakeLists.txt | |
parent | 25464b22107d9d1057e9835718fef1913873f367 (diff) | |
parent | 79bce84900e760e187758e83e4c144cb5179a900 (diff) |
Merge pull request #167 from aaronmjacobs/build-version-option
Add option to disable "build_version" cmake target
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b81c24a..1ac7238d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ OPTION(ALSOFT_CONFIG "Install alsoft.conf sample configuration file" ON) OPTION(ALSOFT_HRTF_DEFS "Install HRTF definition files" ON) OPTION(ALSOFT_AMBDEC_PRESETS "Install AmbDec preset files" ON) OPTION(ALSOFT_INSTALL "Install headers and libraries" ON) +OPTION(ALSOFT_UPDATE_BUILD_VERSION "Update git build version info" ON) if(DEFINED SHARE_INSTALL_DIR) message(WARNING "SHARE_INSTALL_DIR is deprecated. Use the variables provided by the GNUInstallDirs module instead") @@ -1031,7 +1032,7 @@ SET(BACKENDS "${BACKENDS} Null") FIND_PACKAGE(Git) -IF(GIT_FOUND AND EXISTS "${OpenAL_SOURCE_DIR}/.git") +IF(ALSOFT_UPDATE_BUILD_VERSION AND GIT_FOUND AND EXISTS "${OpenAL_SOURCE_DIR}/.git") # Get the current working branch and its latest abbreviated commit hash ADD_CUSTOM_TARGET(build_version ${CMAKE_COMMAND} -D GIT_EXECUTABLE=${GIT_EXECUTABLE} -D LIB_VERSION=${LIB_VERSION} |