From 5f8335c1e49ce108ef3481863833c98efa00411b Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 2 Jul 2020 23:09:26 +0200 Subject: sync with upstream --- cmake/scripts/common/PrepareEnv.cmake | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'cmake/scripts/common/PrepareEnv.cmake') diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 753dca1..559788f 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake @@ -34,6 +34,14 @@ endif() set(PLATFORM_TAG ${CORE_SYSTEM_NAME}) +# The CPU variable is given either by ./tools/depends or by the +# ./cmake/scripts/common/ArchSetup.cmake (which refers to the Kodi building +# itself). However, this file is only used by addons, so CPU can not always +# be defined, so in this case, if empty, the base CPU will be used. +if(NOT CPU) + set(CPU ${CMAKE_SYSTEM_PROCESSOR}) +endif() + if(CORE_SYSTEM_NAME STREQUAL android) if (CPU MATCHES "v7a") set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) @@ -41,13 +49,14 @@ if(CORE_SYSTEM_NAME STREQUAL android) set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) elseif (CPU MATCHES "i686") set(PLATFORM_TAG ${PLATFORM_TAG}-i686) + elseif (CPU MATCHES "x86_64") + set(PLATFORM_TAG ${PLATFORM_TAG}-x86_64) else() message(FATAL_ERROR "Unsupported architecture") endif() -elseif(CORE_SYSTEM_NAME STREQUAL ios) - if (CPU MATCHES armv7) - set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) - elseif (CPU MATCHES arm64) +elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded) + set(PLATFORM_TAG ${CORE_PLATFORM_NAME}) + if (CPU MATCHES arm64) set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) else() message(FATAL_ERROR "Unsupported architecture") -- cgit v1.2.3