1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-19 05:33:02 +00:00

Added a comment to explain a regular expression

This commit is contained in:
Victor Castillo 2024-05-24 03:26:27 +02:00
parent ecbc65028f
commit a4697db0cc
No known key found for this signature in database
GPG Key ID: 8EF1FC8B7182F608

View File

@ -2623,6 +2623,8 @@ else()
find_package(Protobuf)
if((CMAKE_BUILD_TYPE STREQUAL "Debug") AND Protobuf_FOUND AND absl_FOUND)
# This Regular Expression is used to convert the version string provided by `find_package(Protobuf)` into the
# appropriate binary version string. So, for instance, "4.25.3" becomes "25.3.0".
string(REGEX REPLACE "^[0-9]+\.([0-9]+\.[0-9]+)$" "\\1.0" PROTOBUF_LIBRARY_VERSION "${Protobuf_VERSION}")
if((PROTOBUF_LIBRARY_VERSION VERSION_GREATER_EQUAL "22") AND (PROTOBUF_LIBRARY_VERSION VERSION_LESS "26"))
find_package(PkgConfig REQUIRED)