cmake: fix cross-compilation problems

- unexpected pkg-config module (we should not use host binary)
- bump cmake_minimum_required to 3.5 in toolchain files
pull/20507/head
Alexander Alekhin 3 years ago
parent 5af09e73f2
commit 4ff76cad2a
  1. 4
      modules/highgui/cmake/init.cmake
  2. 4
      modules/videoio/cmake/init.cmake
  3. 2
      platforms/linux/gnu.toolchain.cmake
  4. 2
      platforms/linux/riscv.toolchain.cmake

@ -25,7 +25,9 @@ endif()
# Detect available dependencies
#
include(FindPkgConfig)
if(NOT PROJECT_NAME STREQUAL "OpenCV")
include(FindPkgConfig)
endif()
macro(add_backend backend_id cond_var)
if(${cond_var})

@ -1,4 +1,6 @@
include(FindPkgConfig)
if(NOT PROJECT_NAME STREQUAL "OpenCV")
include(FindPkgConfig)
endif()
macro(add_backend backend_id cond_var)
if(${cond_var})

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.5)
# load settings in case of "try compile"
set(TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain.config.cmake")

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.5)
if(COMMAND toolchain_save_config)
return() # prevent recursive call

Loading…
Cancel
Save