Skip to content
Snippets Groups Projects

Remove PkgConfig dependence on Windows

Merged Ammar Nejati requested to merge removePkgConfigDep_Win into develop
Files
2
# FindPkgVersion.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,15 +30,15 @@
#
# 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)
#
# copyright: 2021 Scientific Computing Group, Forschungszentrum Jülich GmbH
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)
Loading