summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/common/PrepareEnv.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts/common/PrepareEnv.cmake')
-rw-r--r--cmake/scripts/common/PrepareEnv.cmake17
1 files changed, 13 insertions, 4 deletions
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()
34 34
35set(PLATFORM_TAG ${CORE_SYSTEM_NAME}) 35set(PLATFORM_TAG ${CORE_SYSTEM_NAME})
36 36
37# The CPU variable is given either by ./tools/depends or by the
38# ./cmake/scripts/common/ArchSetup.cmake (which refers to the Kodi building
39# itself). However, this file is only used by addons, so CPU can not always
40# be defined, so in this case, if empty, the base CPU will be used.
41if(NOT CPU)
42 set(CPU ${CMAKE_SYSTEM_PROCESSOR})
43endif()
44
37if(CORE_SYSTEM_NAME STREQUAL android) 45if(CORE_SYSTEM_NAME STREQUAL android)
38 if (CPU MATCHES "v7a") 46 if (CPU MATCHES "v7a")
39 set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) 47 set(PLATFORM_TAG ${PLATFORM_TAG}-armv7)
@@ -41,13 +49,14 @@ if(CORE_SYSTEM_NAME STREQUAL android)
41 set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) 49 set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64)
42 elseif (CPU MATCHES "i686") 50 elseif (CPU MATCHES "i686")
43 set(PLATFORM_TAG ${PLATFORM_TAG}-i686) 51 set(PLATFORM_TAG ${PLATFORM_TAG}-i686)
52 elseif (CPU MATCHES "x86_64")
53 set(PLATFORM_TAG ${PLATFORM_TAG}-x86_64)
44 else() 54 else()
45 message(FATAL_ERROR "Unsupported architecture") 55 message(FATAL_ERROR "Unsupported architecture")
46 endif() 56 endif()
47elseif(CORE_SYSTEM_NAME STREQUAL ios) 57elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
48 if (CPU MATCHES armv7) 58 set(PLATFORM_TAG ${CORE_PLATFORM_NAME})
49 set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) 59 if (CPU MATCHES arm64)
50 elseif (CPU MATCHES arm64)
51 set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64) 60 set(PLATFORM_TAG ${PLATFORM_TAG}-aarch64)
52 else() 61 else()
53 message(FATAL_ERROR "Unsupported architecture") 62 message(FATAL_ERROR "Unsupported architecture")