From 7673ef5aa80c1af7fb693360dd82f527b46c2c56 Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Sat, 4 Feb 2023 21:06:35 +0800 Subject: [PATCH] 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). --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa0dd6..2e4ae1e 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}")