diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-02-04 21:06:35 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-03-07 23:57:39 +0800 |
commit | 5d351c69c19d212ddd2cf1f3bdb24900820c6776 (patch) | |
tree | 4322cfe7abf0125a0c6afdf3fe5b1617dea6bd6e /CMakeLists.txt | |
parent | liblzma: Improve documentation for version.h. (diff) | |
download | xz-5d351c69c19d212ddd2cf1f3bdb24900820c6776.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 4009cf93..478fb413 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}") |