Merge topic 'FindPkgConfig-PKG_CONFIG'
80aa18b4
Help: Add release notes for topic 'FindPkgConfig-PKG_CONFIG'c53b5cd2
FindPkgConfig: Prefer PKG_CONFIG to find pkg-config (#13175)
This commit is contained in:
commit
eafd2a8511
|
@ -0,0 +1,5 @@
|
|||
FindPkgConfig-PKG_CONFIG
|
||||
------------------------
|
||||
|
||||
* The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG``
|
||||
environment variable value as the ``pkg-config`` executable, if set.
|
|
@ -6,6 +6,11 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
# To find the pkg-config executable, it uses the variable
|
||||
# PKG_CONFIG_EXECUTABLE or the environment variable PKG_CONFIG first.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ::
|
||||
|
@ -134,8 +139,9 @@
|
|||
# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2)
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2006-2009 Kitware, Inc.
|
||||
# Copyright 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
# Copyright 2006-2014 Kitware, Inc.
|
||||
# Copyright 2014 Christoph Grüninger <foss@grueninger.de>
|
||||
# Copyright 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
|
@ -150,6 +156,10 @@
|
|||
### Common stuff ####
|
||||
set(PKG_CONFIG_VERSION 1)
|
||||
|
||||
# find pkg-config, use PKG_CONFIG if set
|
||||
if((NOT PKG_CONFIG_EXECUTABLE) AND (NOT "$ENV{PKG_CONFIG}" STREQUAL ""))
|
||||
set(PKG_CONFIG_EXECUTABLE "$ENV{PKG_CONFIG}" CACHE FILEPATH "pkg-config executable")
|
||||
endif()
|
||||
find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable")
|
||||
mark_as_advanced(PKG_CONFIG_EXECUTABLE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue