Merge pull request #14430 from alalek:cmake_fix_include_pkgconfig_3.4

pull/14433/head
Alexander Alekhin 6 years ago
commit 82be2d6210
  1. 2
      CMakeLists.txt
  2. 2
      cmake/OpenCVUtils.cmake

@ -720,7 +720,7 @@ ocv_cmake_hook(POST_COMPILER_OPTIONS)
# ----------------------------------------------------------------------------
if(UNIX)
if(NOT APPLE_FRAMEWORK OR OPENCV_ENABLE_PKG_CONFIG)
if(CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{PKG_CONFIG_LIBDIR}
if(CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{PKG_CONFIG_LIBDIR} AND NOT DEFINED ENV{PKG_CONFIG_SYSROOT_DIR}
AND NOT OPENCV_ENABLE_PKG_CONFIG
)
if(NOT PkgConfig_FOUND)

@ -743,7 +743,7 @@ macro(ocv_check_modules define)
endif()
unset(${define}_${__modname}_FOUND)
endforeach()
if(COMMAND pkg_check_modules)
if(PKG_CONFIG_FOUND OR PkgConfig_FOUND)
pkg_check_modules(${define} ${ARGN})
endif()
if(${define}_FOUND)

Loading…
Cancel
Save