summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2012-10-03 04:45:22 -0400
committerPhilip Lowman <philip@yhbt.com>2012-10-03 04:45:22 -0400
commitb74267745b012e1f3769ea5a7802c79f5480852b (patch)
tree39a5f368b95dfd28465ede035d39ff7f382451ab /Modules
parent47e50423bfbbb277e60b578d1a7174f1fc24b01c (diff)
downloadcmake-b74267745b012e1f3769ea5a7802c79f5480852b.tar.gz
FindGTK2: Rollback lib64 changes which broke header file finding
The changes in "use PATH_SUFFIXES to simplify find_* calls" on 8/14 regressed important functionality in FindGTK for using find_path to locate header files in <prefix>/lib/<gtk_package>/include. The find_path function doesn't search <prefix>/lib only <prefix>/include.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGTK2.cmake37
1 files changed, 26 insertions, 11 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 49af0f2bd8..2373422be1 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -151,7 +151,7 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
"_GTK2_FIND_INCLUDE_DIR( ${_var} ${_hdr} )")
endif()
- set(_relatives
+ set(_gtk_packages
# If these ever change, things will break.
${GTK2_ADDITIONAL_SUFFIXES}
glibmm-2.4
@@ -172,8 +172,15 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
sigc++-2.0
)
- set(_suffixes include lib)
- foreach(_d ${_relatives})
+ #
+ # NOTE: The following suffixes cause searching for header files in both of
+ # these directories:
+ # /usr/include/<pkg>
+ # /usr/lib/<pkg>/include
+ #
+
+ set(_suffixes)
+ foreach(_d ${_gtk_packages})
list(APPEND _suffixes ${_d})
list(APPEND _suffixes ${_d}/include) # for /usr/lib/gtk-2.0/include
endforeach()
@@ -186,15 +193,23 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
find_path(${_var} ${_hdr}
PATHS
/usr/local/lib64
+ /usr/local/lib
/usr/lib64
- /opt/gnome
- /opt/openwin
- /usr/openwin
- /sw
- /opt/local
- ENV GTKMM_BASEPATH
- [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
+ /usr/lib
+ /opt/gnome/include
+ /opt/gnome/lib
+ /opt/openwin/include
+ /usr/openwin/lib
+ /sw/include
+ /sw/lib
+ /opt/local/include
+ /opt/local/lib
+ $ENV{GTKMM_BASEPATH}/include
+ $ENV{GTKMM_BASEPATH}/lib
+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
PATH_SUFFIXES
${_suffixes}
)