From 424e1150ae409fcf1cae695f9939c1b2620e3a3f Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sat, 14 Dec 2019 15:02:43 +0000 Subject: [PATCH] cmake: fix OpenCV_ARCH --- cmake/OpenCVDetectCXXCompiler.cmake | 8 ++++---- cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake index 6c50b56189..c27fb4f549 100644 --- a/cmake/OpenCVDetectCXXCompiler.cmake +++ b/cmake/OpenCVDetectCXXCompiler.cmake @@ -142,13 +142,13 @@ if(DEFINED OpenCV_ARCH AND DEFINED OpenCV_RUNTIME) elseif(MSVC) # see Modules/CMakeGenericSystem.cmake if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") - set(arch_hint "x64") + set(OpenCV_ARCH "x64") elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM64") - set(arch_hint "ARM64") + set(OpenCV_ARCH "ARM64") elseif("${CMAKE_GENERATOR}" MATCHES "ARM") - set(arch_hint "ARM") + set(OpenCV_ARCH "ARM") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") - set(arch_hint "x64") + set(OpenCV_ARCH "x64") else() set(OpenCV_ARCH x86) endif() diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in index ac2203bf45..5da438a9ee 100644 --- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in @@ -98,13 +98,13 @@ if(DEFINED OpenCV_ARCH AND DEFINED OpenCV_RUNTIME) elseif(MSVC) # see Modules/CMakeGenericSystem.cmake if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") - set(arch_hint "x64") + set(OpenCV_ARCH "x64") elseif("${CMAKE_GENERATOR_PLATFORM}" MATCHES "ARM64") - set(arch_hint "ARM64") + set(OpenCV_ARCH "ARM64") elseif("${CMAKE_GENERATOR}" MATCHES "ARM") - set(arch_hint "ARM") + set(OpenCV_ARCH "ARM") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") - set(arch_hint "x64") + set(OpenCV_ARCH "x64") else() set(OpenCV_ARCH x86) endif()