Jelajahi Sumber

First pass at mac support for building assimp. Install step isn't fully functional.`

Signed-off-by: AMZN-stankowi <[email protected]>
AMZN-stankowi 3 tahun lalu
induk
melakukan
88879c014c

+ 12 - 12
package-system/assimp/build_assimp_mac.sh

@@ -6,21 +6,21 @@
 #
 #
 
-cmake -S temp/src -B temp/build -G Xcode \
-    -DBUILD_SHARED_LIBS=OFF ^
-    -DCMAKE_BUILD_TYPE=Release ^
-    -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS" ^
-    -DASSIMP_BUILD_ZLIB=OFF ^
+cmake -S temp/src -B temp/build \
+    -DCMAKE_CXX_COMPILER=clang++ \
+    -DBUILD_SHARED_LIBS=OFF \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS" \
+    -DASSIMP_BUILD_ZLIB=OFF \
     temp/src/CMakeLists.txt || exit 1
 cmake --build temp/src --config release || exit 1
-cmake --build temp/src --config debug || exit 1
 
-cmake -S temp/src -B temp/build -G Xcode \
-    -DBUILD_SHARED_LIBS=OFF ^
-    -DCMAKE_BUILD_TYPE=Release ^
-    -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS" ^
-    -DASSIMP_BUILD_ZLIB=OFF ^
+cmake -S temp/src -B temp/build \
+    -DCMAKE_CXX_COMPILER=clang++ \
+    -DBUILD_SHARED_LIBS=ON \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS" \
+    -DASSIMP_BUILD_ZLIB=OFF \
     temp/src/CMakeLists.txt || exit 1
 cmake --build temp/src --config release || exit 1
-cmake --build temp/src --config debug || exit 1
 

+ 2 - 2
package-system/assimp/build_config.json

@@ -35,8 +35,8 @@
                 "custom_build_cmd": [
                     "./build_assimp_mac.sh"
                  ],
-                 "custom_install_cmd": [
-                    "./install_assimp_mac.sh"
+                 "custom_install_json": [
+                    "./install_assimp_mac.json"
                  ],
                  "custom_test_cmd" : [
                     "./test_assimp_mac.sh"

+ 11 - 0
package-system/assimp/install_assimp_mac.json

@@ -0,0 +1,11 @@
+{
+  "Source_Subfolder": "src",
+  "Install_Paths": [
+    "lib/libassimp.a",
+    "bin/libassimp.5.0.1.dylib",
+    "bin/libassimp.5.dylib",
+    "bin/libassimp.dylib",
+    "bin/assimp",
+    "bin/unit"
+  ]
+}

+ 17 - 0
package-system/assimp/test_assimp_mac.sh

@@ -0,0 +1,17 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project.
+# For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# The tests leave behind temp files in the current working directory.
+# Change to a temp subdirectory to keep the working directory clean.
+cd temp
+rm -rf test_out
+mkdir test_out
+cd test_out
+
+../src/bin/unit || exit 1
+exit 0