diff options
author | Aaron Jacobs <[email protected]> | 2018-01-28 00:03:02 -0800 |
---|---|---|
committer | Aaron Jacobs <[email protected]> | 2018-01-28 00:03:02 -0800 |
commit | 79bce84900e760e187758e83e4c144cb5179a900 (patch) | |
tree | 58d5eaeee5134e46d13ebf199517d647e0f78474 /CMakeLists.txt | |
parent | e12059a31186605ce2ed534ba42004edf3df5a6b (diff) |
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 b5c65c55..c13c75c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,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") @@ -1136,7 +1137,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} |