diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-09-13 21:14:52 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2019-10-24 18:55:02 +0200 |
commit | 4b8c1bc158adccc1fb6e8ebc9b1e3cb5a7de3a38 (patch) | |
tree | dc2a40b205a242c3e5f227eb18e04e46e34e6531 /cmake/modules/FindGLIB.cmake | |
parent | 8904b25f5cb270443e87354ada4d9ef5f6833d1a (diff) |
CMake: Make pkg-config optional in FindXXX modules
Diffstat (limited to 'cmake/modules/FindGLIB.cmake')
-rw-r--r-- | cmake/modules/FindGLIB.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake index 71c982cd4c..e7e3dac05e 100644 --- a/cmake/modules/FindGLIB.cmake +++ b/cmake/modules/FindGLIB.cmake @@ -41,8 +41,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -find_package(PkgConfig) -pkg_check_modules(PC_GLIB QUIET glib-2.0) +find_package(PkgConfig QUIET) +if(PkgConfig_FOUND) + pkg_check_modules(PC_GLIB QUIET glib-2.0) +endif() find_library(GLIB_LIBRARIES NAMES glib-2.0 |