summaryrefslogtreecommitdiffstats
path: root/Modules/FindPkgConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r--Modules/FindPkgConfig.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index b79e9df..b6156dd 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -200,7 +200,7 @@ function(_pkg_create_imp_target _prefix _no_cmake_path _no_cmake_environment_pat
set(_find_opts "NO_CMAKE_PATH")
endif()
if(_no_cmake_environment_path)
- set(_find_opts "${_find_opts} NO_CMAKE_ENVIRONMENT_PATH")
+ string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH")
endif()
foreach (flag IN LISTS ${_prefix}_LDFLAGS)
@@ -316,9 +316,13 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
list(APPEND _lib_dirs "lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig")
endif()
else()
- # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
+ # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
+ get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
+ if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ list(APPEND _lib_dirs "lib32/pkgconfig")
+ endif()
get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
- if(uselib64)
+ if(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND _lib_dirs "lib64/pkgconfig")
endif()
endif()