mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
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).
This commit is contained in:
parent
b8bce89be7
commit
7673ef5aa8
1 changed files with 2 additions and 0 deletions
|
@ -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}")
|
||||
|
|
Loading…
Reference in a new issue