From f5126a3ef0a0876f51d6b9ae3d093a930ca1cbf5 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 27 Nov 2015 12:40:03 +0000 Subject: Use PATH_SUFFIXES in ecm_find_package_handle_library_components() This is required to find poppler without package config as all the headers are installed in a poppler subdirectory of the include directory --- modules/ECMFindModuleHelpers.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/ECMFindModuleHelpers.cmake') diff --git a/modules/ECMFindModuleHelpers.cmake b/modules/ECMFindModuleHelpers.cmake index 2044efe1..6a08b04e 100644 --- a/modules/ECMFindModuleHelpers.cmake +++ b/modules/ECMFindModuleHelpers.cmake @@ -47,7 +47,9 @@ # The __lib variable should contain the name of this library, # and __header variable should contain the name of a header # file associated with it (whatever relative path is normally passed to -# '#include'). ecm_find_package_components() will then search for the library +# '#include'). __header_subdir variable can be used to specify +# which subdirectory of the include path the headers will be found in. +# ecm_find_package_components() will then search for the library # and include directory (creating appropriate cache variables) and create an # imported library target named ::. # @@ -218,6 +220,7 @@ macro(ecm_find_package_handle_library_components module_name) find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR NAMES ${${module_name}_${ecm_fpwc_comp}_header} HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS} + PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir} ) find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY NAMES ${${module_name}_${ecm_fpwc_comp}_lib} -- cgit v1.2.1