1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

cmake: fix pkg-config handling

Avoid non-intentional call of "include(FindPkgConfig)"
It should be handled in the root CMakeLists.txt (safely for cross-compiling)
This commit is contained in:
Alexander Alekhin
2019-04-26 15:13:16 +03:00
parent d0032b0717
commit c9f3f4d1d3
7 changed files with 77 additions and 78 deletions
+1 -1
View File
@@ -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)