瀏覽代碼

Linux build, install, and test step for assimp.
Added additional printouts to pull_and_build_from_git.py to make it easier to find the output.

Signed-off-by: AMZN-stankowi <[email protected]>

AMZN-stankowi 3 年之前
父節點
當前提交
6c0c89ded1

+ 2 - 0
Scripts/extras/pull_and_build_from_git.py

@@ -728,8 +728,10 @@ class BuildInfo(object):
                     # but that's not available in earlier Python versions.
                     # It's useful to treat it as an error if the target exists, because that means that something has
                     # already touched that folder and there might be unexpected behavior copying an entire tree into it.
+                    print(f"    Copying directory '{resolved_src_path}' to '{resolved_target_path}'")
                     shutil.copytree(resolved_src_path, resolved_target_path)
                 elif os.path.isfile(resolved_src_path):
+                    print(f"    Copying file '{resolved_src_path}' to '{resolved_target_path}'")
                     os.makedirs(os.path.dirname(resolved_target_path), exist_ok=True)
                     shutil.copy2(resolved_src_path, resolved_target_path)
                 else:

+ 26 - 0
package-system/assimp/build_assimp_linux.sh

@@ -0,0 +1,26 @@
+#
+# 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
+#
+#
+
+cmake -S temp/src -B temp/build \
+    -DBUILD_SHARED_LIBS=OFF \
+    -Dcxx=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 -S temp/src -B temp/build \
+    -DBUILD_SHARED_LIBS=ON \
+    -Dcxx=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
+

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

@@ -51,8 +51,8 @@
                 "custom_build_cmd": [
                     "./build_assimp_linux.sh"
                 ],
-                "custom_install_cmd": [
-                    "./install_assimp_linux.sh"
+                "custom_install_json": [
+                    "./install_assimp_linux.json"
                 ],
                 "custom_test_cmd" : [
                    "./test_assimp_linux.sh"

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

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

+ 17 - 0
package-system/assimp/test_assimp_linux.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