From 9cb8f61e85aadaae5e62f503954914eaca96b497 Mon Sep 17 00:00:00 2001
From: Ammar Nejati <a.nejati@fz-juelich.de>
Date: Wed, 20 Oct 2021 17:53:16 +0200
Subject: [PATCH] CMake: Rename 'FindPkgVersion' -> 'FindPkgVersionWin'

The module is used only under Windows.
---
 ...{FindPkgVersion.cmake => FindPkgVersionWin.cmake} | 12 ++++++------
 cmake/find/FindCerf.cmake                            |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
 rename cmake/commons/{FindPkgVersion.cmake => FindPkgVersionWin.cmake} (86%)

diff --git a/cmake/commons/FindPkgVersion.cmake b/cmake/commons/FindPkgVersionWin.cmake
similarity index 86%
rename from cmake/commons/FindPkgVersion.cmake
rename to cmake/commons/FindPkgVersionWin.cmake
index 045198738ff..2c9f719e7c8 100644
--- a/cmake/commons/FindPkgVersion.cmake
+++ b/cmake/commons/FindPkgVersionWin.cmake
@@ -1,13 +1,13 @@
-# FindPkgVersion.cmake
+# FindPkgVersionWin.cmake
 # --------------------
 # description:
-#   Defines the function `find_pkg_version`, which obtains the version of a
+#   Defines the function `find_pkg_version_win`, which obtains the version of a
 #   library from the `pkgconfig` (*.pc) files in a given path.
 #   This is currently used only under Windows, as a simple replacement for
 #   `PkgConfig` from MSYS2 platform.
 #
 # usage:
-#   find_pkg_version(<library-name> <config-filename> <search-paths> <output-var-name>)
+#   find_pkg_version_win(<library-name> <config-filename> <search-paths> <output-var-name>)
 #
 # parameters:
 #   * library-name: name of the library (eg. "cerf")
@@ -30,13 +30,13 @@
 #
 # example:
 #   * Find the version of the 'cerf' package in the `CMAKE_LIBRARY_PATH` folders:
-#     find_pkg_version("cerf" "" "${CMAKE_LIBRARY_PATH}" Cerf_VERSION)
+#     find_pkg_version_win("cerf" "" "${CMAKE_LIBRARY_PATH}" Cerf_VERSION)
 
-function(find_pkg_version libname conffile paths output_var)
+function(find_pkg_version_win libname conffile paths output_var)
 
     string(STRIP "${paths}" _paths)
     string(STRIP "${conffile}" _pkgconffile)
-    set(_msghdr "find_pkg_version::")  # message header
+    set(_msghdr "find_pkg_version_win::")  # message header
 
     # find the configuration file in the given paths
     if(NOT _pkgconffile)
diff --git a/cmake/find/FindCerf.cmake b/cmake/find/FindCerf.cmake
index d50d166776f..c37dadfd477 100644
--- a/cmake/find/FindCerf.cmake
+++ b/cmake/find/FindCerf.cmake
@@ -26,8 +26,8 @@ if(NOT WIN32)
         endif()
     endif()
 else()
-    include(commons/FindPkgVersion)
-    find_pkg_version("cerf" "" "${CMAKE_LIBRARY_PATH}" Cerf_VERSION)
+    include(commons/FindPkgVersionWin)
+    find_pkg_version_win("cerf" "" "${CMAKE_LIBRARY_PATH}" Cerf_VERSION)
 endif()
 
 find_path(Cerf_INCLUDE_DIR cerf.h)
-- 
GitLab