diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-02-04 21:06:35 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-02-04 21:06:35 +0800 |
commit | 7673ef5aa80c1af7fb693360dd82f527b46c2c56 (patch) | |
tree | ff521392da57c0e032791c82d39d848949ef1303 /CMakeLists.txt | |
parent | xz: Add a comment clarifying the use of start_time in mytime.c. (diff) | |
download | xz-7673ef5aa80c1af7fb693360dd82f527b46c2c56.tar.xz |
Build: Adjust CMake version search regex.
Now, the LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, and LZMA_VERSION_PATCH
macros do not need to be on consecutive lines in version.h. They can be
separated by more whitespace, comments, or even other content, as long
as they appear in the proper order (major, minor, patch).
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa0dd6f..2e4ae1ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,9 @@ file(READ src/liblzma/api/lzma/version.h XZ_VERSION) string(REGEX REPLACE "^.*\n\ #define LZMA_VERSION_MAJOR ([0-9]+)\n\ +.*\ #define LZMA_VERSION_MINOR ([0-9]+)\n\ +.*\ #define LZMA_VERSION_PATCH ([0-9]+)\n\ .*$" "\\1.\\2.\\3" XZ_VERSION "${XZ_VERSION}") |