summaryrefslogtreecommitdiff
path: root/src/mesh/assimp-master/contrib/draco/cmake/toolchains
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-03-04 10:47:15 -0600
committersanine <sanine.not@pm.me>2022-03-04 10:47:15 -0600
commit058f98a63658dc1a2579826ba167fd61bed1e21f (patch)
treebcba07a1615a14d943f3af3f815a42f3be86b2f3 /src/mesh/assimp-master/contrib/draco/cmake/toolchains
parent2f8028ac9e0812cb6f3cbb08f0f419e4e717bd22 (diff)
add assimp submodule
Diffstat (limited to 'src/mesh/assimp-master/contrib/draco/cmake/toolchains')
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/aarch64-linux-gnu.cmake14
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/android-ndk-common.cmake23
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/android.cmake39
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-ios-common.cmake17
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-linux-gnueabihf.cmake15
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-android-ndk-libcpp.cmake16
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-ios.cmake14
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-linux-gcc.cmake18
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-android-ndk-libcpp.cmake16
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-ios.cmake14
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-linux-gcc.cmake24
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7s-ios.cmake14
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/i386-ios.cmake15
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86-android-ndk-libcpp.cmake16
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-android-ndk-libcpp.cmake16
-rw-r--r--src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-ios.cmake15
16 files changed, 286 insertions, 0 deletions
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/aarch64-linux-gnu.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/aarch64-linux-gnu.cmake
new file mode 100644
index 0000000..87e0b4a
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/aarch64-linux-gnu.cmake
@@ -0,0 +1,14 @@
+if(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_)
+ return()
+endif() # DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_
+set(DRACO_CMAKE_TOOLCHAINS_AARCH64_LINUX_GNU_CMAKE_ 1)
+
+set(CMAKE_SYSTEM_NAME "Linux")
+
+if("${CROSS}" STREQUAL "")
+ set(CROSS aarch64-linux-gnu-)
+endif()
+
+set(CMAKE_CXX_COMPILER ${CROSS}g++)
+set(CMAKE_CXX_FLAGS_INIT "-march=armv8-a")
+set(CMAKE_SYSTEM_PROCESSOR "aarch64")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android-ndk-common.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android-ndk-common.cmake
new file mode 100644
index 0000000..5126d6e
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android-ndk-common.cmake
@@ -0,0 +1,23 @@
+if(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ANDROID_NDK_COMMON_CMAKE_ 1)
+
+# Toolchain files do not have access to cached variables:
+# https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate
+# environment variable when loaded the first time.
+if(DRACO_ANDROID_NDK_PATH)
+ set(ENV{DRACO_ANDROID_NDK_PATH} "${DRACO_ANDROID_NDK_PATH}")
+else()
+ set(DRACO_ANDROID_NDK_PATH "$ENV{DRACO_ANDROID_NDK_PATH}")
+endif()
+
+set(CMAKE_SYSTEM_NAME Android)
+
+if(NOT CMAKE_ANDROID_STL_TYPE)
+ set(CMAKE_ANDROID_STL_TYPE c++_static)
+endif()
+
+if(NOT CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION)
+ set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
+endif()
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android.cmake
new file mode 100644
index 0000000..b8f576d
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/android.cmake
@@ -0,0 +1,39 @@
+if(DRACO_CMAKE_TOOLCHAINS_ANDROID_CMAKE_)
+ return()
+endif() # DRACO_CMAKE_TOOLCHAINS_ANDROID_CMAKE_
+
+# Additional ANDROID_* settings are available, see:
+# https://developer.android.com/ndk/guides/cmake#variables
+
+if(NOT ANDROID_PLATFORM)
+ set(ANDROID_PLATFORM android-21)
+endif()
+
+# Choose target architecture with:
+#
+# -DANDROID_ABI={armeabi-v7a,armeabi-v7a with NEON,arm64-v8a,x86,x86_64}
+if(NOT ANDROID_ABI)
+ set(ANDROID_ABI arm64-v8a)
+endif()
+
+# Force arm mode for 32-bit targets (instead of the default thumb) to improve
+# performance.
+if(NOT ANDROID_ARM_MODE)
+ set(ANDROID_ARM_MODE arm)
+endif()
+
+# Toolchain files do not have access to cached variables:
+# https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate
+# environment variable when loaded the first time.
+if(DRACO_ANDROID_NDK_PATH)
+ set(ENV{DRACO_ANDROID_NDK_PATH} "${DRACO_ANDROID_NDK_PATH}")
+else()
+ set(DRACO_ANDROID_NDK_PATH "$ENV{DRACO_ANDROID_NDK_PATH}")
+endif()
+
+if(NOT DRACO_ANDROID_NDK_PATH)
+ message(FATAL_ERROR "DRACO_ANDROID_NDK_PATH not set.")
+ return()
+endif()
+
+include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-ios-common.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-ios-common.cmake
new file mode 100644
index 0000000..65326d1
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-ios-common.cmake
@@ -0,0 +1,17 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARM_IOS_COMMON_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_ARM_IOS_COMMON_CMAKE_ 1)
+
+set(CMAKE_SYSTEM_NAME "Darwin")
+if(CMAKE_OSX_SDK)
+ set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SDK})
+else()
+ set(CMAKE_OSX_SYSROOT iphoneos)
+endif()
+set(CMAKE_C_COMPILER clang)
+set(CMAKE_C_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}")
+set(CMAKE_CXX_COMPILER clang++)
+set(CMAKE_CXX_COMPILER_ARG1 "-arch ${CMAKE_SYSTEM_PROCESSOR}")
+
+# TODO(tomfinegan): Handle bit code embedding.
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-linux-gnueabihf.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-linux-gnueabihf.cmake
new file mode 100644
index 0000000..6e45969
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm-linux-gnueabihf.cmake
@@ -0,0 +1,15 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_)
+ return()
+endif() # DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_
+set(DRACO_CMAKE_TOOLCHAINS_ARM_LINUX_GNUEABIHF_CMAKE_ 1)
+
+set(CMAKE_SYSTEM_NAME "Linux")
+
+if("${CROSS}" STREQUAL "")
+ set(CROSS arm-linux-gnueabihf-)
+endif()
+
+set(CMAKE_CXX_COMPILER ${CROSS}g++)
+set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -marm")
+set(CMAKE_SYSTEM_PROCESSOR "armv7")
+set(DRACO_NEON_INTRINSICS_FLAG "-mfpu=neon")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-android-ndk-libcpp.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-android-ndk-libcpp.cmake
new file mode 100644
index 0000000..4b6d366
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-android-ndk-libcpp.cmake
@@ -0,0 +1,16 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARM64_ANDROID_NDK_LIBCPP_CMAKE_ 1)
+
+include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
+
+if(NOT ANDROID_PLATFORM)
+ set(ANROID_PLATFORM android-21)
+endif()
+
+if(NOT ANDROID_ABI)
+ set(ANDROID_ABI arm64-v8a)
+endif()
+
+include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-ios.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-ios.cmake
new file mode 100644
index 0000000..c4ec7e3
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-ios.cmake
@@ -0,0 +1,14 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARM64_IOS_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARM64_IOS_CMAKE_ 1)
+
+if(XCODE)
+ # TODO(tomfinegan): Handle arm builds in Xcode.
+ message(FATAL_ERROR "This toolchain does not support Xcode.")
+endif()
+
+set(CMAKE_SYSTEM_PROCESSOR "arm64")
+set(CMAKE_OSX_ARCHITECTURES "arm64")
+
+include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-linux-gcc.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-linux-gcc.cmake
new file mode 100644
index 0000000..046ff01
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/arm64-linux-gcc.cmake
@@ -0,0 +1,18 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARM64_LINUX_GCC_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARM64_LINUX_GCC_CMAKE_ 1)
+
+set(CMAKE_SYSTEM_NAME "Linux")
+
+if("${CROSS}" STREQUAL "")
+ # Default the cross compiler prefix to something known to work.
+ set(CROSS aarch64-linux-gnu-)
+endif()
+
+set(CMAKE_C_COMPILER ${CROSS}gcc)
+set(CMAKE_CXX_COMPILER ${CROSS}g++)
+set(AS_EXECUTABLE ${CROSS}as)
+set(CMAKE_C_COMPILER_ARG1 "-march=armv8-a")
+set(CMAKE_CXX_COMPILER_ARG1 "-march=armv8-a")
+set(CMAKE_SYSTEM_PROCESSOR "arm64")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-android-ndk-libcpp.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-android-ndk-libcpp.cmake
new file mode 100644
index 0000000..80ee98b
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-android-ndk-libcpp.cmake
@@ -0,0 +1,16 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARMV7_ANDROID_NDK_LIBCPP_CMAKE_ 1)
+
+include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
+
+if(NOT ANDROID_PLATFORM)
+ set(ANDROID_PLATFORM android-18)
+endif()
+
+if(NOT ANDROID_ABI)
+ set(ANDROID_ABI armeabi-v7a)
+endif()
+
+include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-ios.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-ios.cmake
new file mode 100644
index 0000000..8ddd699
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-ios.cmake
@@ -0,0 +1,14 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_ 1)
+
+if(XCODE)
+ # TODO(tomfinegan): Handle arm builds in Xcode.
+ message(FATAL_ERROR "This toolchain does not support Xcode.")
+endif()
+
+set(CMAKE_SYSTEM_PROCESSOR "armv7")
+set(CMAKE_OSX_ARCHITECTURES "armv7")
+
+include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-linux-gcc.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-linux-gcc.cmake
new file mode 100644
index 0000000..9c94723
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7-linux-gcc.cmake
@@ -0,0 +1,24 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARMV7_LINUX_GCC_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARMV7_LINUX_GCC_CMAKE_ 1)
+
+set(CMAKE_SYSTEM_NAME "Linux")
+
+if("${CROSS}" STREQUAL "")
+ # Default the cross compiler prefix to something known to work.
+ set(CROSS arm-linux-gnueabihf-)
+endif()
+
+if(NOT ${CROSS} MATCHES hf-$)
+ set(DRACO_EXTRA_TOOLCHAIN_FLAGS "-mfloat-abi=softfp")
+endif()
+
+set(CMAKE_C_COMPILER ${CROSS}gcc)
+set(CMAKE_CXX_COMPILER ${CROSS}g++)
+set(AS_EXECUTABLE ${CROSS}as)
+set(CMAKE_C_COMPILER_ARG1
+ "-march=armv7-a -mfpu=neon ${DRACO_EXTRA_TOOLCHAIN_FLAGS}")
+set(CMAKE_CXX_COMPILER_ARG1
+ "-march=armv7-a -mfpu=neon ${DRACO_EXTRA_TOOLCHAIN_FLAGS}")
+set(CMAKE_SYSTEM_PROCESSOR "armv7")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7s-ios.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7s-ios.cmake
new file mode 100644
index 0000000..b433025
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/armv7s-ios.cmake
@@ -0,0 +1,14 @@
+if(DRACO_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_ 1)
+
+if(XCODE)
+ # TODO(tomfinegan): Handle arm builds in Xcode.
+ message(FATAL_ERROR "This toolchain does not support Xcode.")
+endif()
+
+set(CMAKE_SYSTEM_PROCESSOR "armv7s")
+set(CMAKE_OSX_ARCHITECTURES "armv7s")
+
+include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/i386-ios.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/i386-ios.cmake
new file mode 100644
index 0000000..e9a1055
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/i386-ios.cmake
@@ -0,0 +1,15 @@
+if(DRACO_CMAKE_TOOLCHAINS_i386_IOS_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_i386_IOS_CMAKE_ 1)
+
+if(XCODE)
+ # TODO(tomfinegan): Handle arm builds in Xcode.
+ message(FATAL_ERROR "This toolchain does not support Xcode.")
+endif()
+
+set(CMAKE_SYSTEM_PROCESSOR "i386")
+set(CMAKE_OSX_ARCHITECTURES "i386")
+set(CMAKE_OSX_SDK "iphonesimulator")
+
+include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86-android-ndk-libcpp.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86-android-ndk-libcpp.cmake
new file mode 100644
index 0000000..d433836
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86-android-ndk-libcpp.cmake
@@ -0,0 +1,16 @@
+if(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_X86_ANDROID_NDK_LIBCPP_CMAKE_ 1)
+
+include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
+
+if(NOT ANDROID_PLATFORM)
+ set(ANDROID_PLATFORM android-18)
+endif()
+
+if(NOT ANDROID_ABI)
+ set(ANDROID_ABI x86)
+endif()
+
+include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-android-ndk-libcpp.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-android-ndk-libcpp.cmake
new file mode 100644
index 0000000..d6fabea
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-android-ndk-libcpp.cmake
@@ -0,0 +1,16 @@
+if(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_X86_64_ANDROID_NDK_LIBCPP_CMAKE_ 1)
+
+include("${CMAKE_CURRENT_LIST_DIR}/android-ndk-common.cmake")
+
+if(NOT ANDROID_PLATFORM)
+ set(ANDROID_PLATFORM android-21)
+endif()
+
+if(NOT ANDROID_ABI)
+ set(ANDROID_ABI x86_64)
+endif()
+
+include("${DRACO_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
diff --git a/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-ios.cmake b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-ios.cmake
new file mode 100644
index 0000000..4c50a72
--- /dev/null
+++ b/src/mesh/assimp-master/contrib/draco/cmake/toolchains/x86_64-ios.cmake
@@ -0,0 +1,15 @@
+if(DRACO_CMAKE_TOOLCHAINS_X86_64_IOS_CMAKE_)
+ return()
+endif()
+set(DRACO_CMAKE_TOOLCHAINS_X86_64_IOS_CMAKE_ 1)
+
+if(XCODE)
+ # TODO(tomfinegan): Handle arm builds in Xcode.
+ message(FATAL_ERROR "This toolchain does not support Xcode.")
+endif()
+
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+set(CMAKE_OSX_ARCHITECTURES "x86_64")
+set(CMAKE_OSX_SDK "iphonesimulator")
+
+include("${CMAKE_CURRENT_LIST_DIR}/arm-ios-common.cmake")