mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 02:39:48 -06:00
committed by
Brad King
parent
1a315c55e3
commit
7e49b98219
@@ -306,6 +306,10 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
|
||||
endif()
|
||||
find_path(GTK2_${_var}_INCLUDE_DIR ${_hdr}
|
||||
PATHS
|
||||
${PC_GLIB2_INCLUDEDIR}
|
||||
${PC_GLIB2_LIBDIR}
|
||||
${PC_GTK2_INCLUDEDIR}
|
||||
${PC_GTK2_LIBDIR}
|
||||
${_gtk2_arch_dir}
|
||||
/usr/local/libx32
|
||||
/usr/local/lib64
|
||||
@@ -616,6 +620,23 @@ if(NOT GTK2_FIND_COMPONENTS)
|
||||
set(GTK2_FIND_COMPONENTS gtk)
|
||||
endif()
|
||||
|
||||
# Retrieve LIBDIR from the GTK2 and GLIB2 pkg-config files, which are
|
||||
# used to compute the arch-specific include prefixes. While at it,
|
||||
# also retrieve their INCLUDEDIR, to accommodate non-standard layouts.
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_GTK2 QUIET gtk+-2.0)
|
||||
if(PC_GTK2_FOUND)
|
||||
pkg_get_variable(PC_GTK2_INCLUDEDIR gtk+-2.0 includedir)
|
||||
pkg_get_variable(PC_GTK2_LIBDIR gtk+-2.0 libdir)
|
||||
endif()
|
||||
pkg_check_modules(PC_GLIB2 QUIET glib-2.0)
|
||||
if(PC_GLIB2_FOUND)
|
||||
pkg_get_variable(PC_GLIB2_INCLUDEDIR glib-2.0 includedir)
|
||||
pkg_get_variable(PC_GLIB2_LIBDIR glib-2.0 libdir)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
# If specified, enforce version number
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user