From c304d61fcabdd29100091f236dd415523bb2e3ed Mon Sep 17 00:00:00 2001 From: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:52:27 -0700 Subject: [PATCH 1/3] Adds the Imath package, in prep for upgrading others OpenEXR, OpenColorIO, OpenImageIO all depend on this. IMath used to be part of OpenEXR but is its own library in the latest versions, which OpenEXR depends on. Signed-off-by: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> --- Scripts/cmake/o3de_package_utilities.cmake | 4 +- package-system/Imath/FindImath.cmake | 11 ++ package-system/Imath/build_config.json | 100 ++++++++++++++++++ .../Imath/imath-config-version.cmake | 39 +++++++ package-system/Imath/imath-config.cmake | 50 +++++++++ package-system/Imath/imath-test-android.cmd | 35 ++++++ package-system/Imath/imath-test-ios.sh | 31 ++++++ package-system/Imath/imath-test-linux.sh | 31 ++++++ package-system/Imath/imath-test-mac.sh | 34 ++++++ package-system/Imath/imath-test-windows.cmd | 37 +++++++ .../test/find-using-config/CMakeLists.txt | 28 +++++ .../test/find-using-module/CMakeLists.txt | 21 ++++ package-system/Imath/test/imathtest.cpp | 46 ++++++++ package_build_list_host_darwin-arm64.json | 4 + package_build_list_host_linux-aarch64.json | 2 + package_build_list_host_linux.json | 2 + package_build_list_host_windows.json | 4 + 17 files changed, 478 insertions(+), 1 deletion(-) create mode 100644 package-system/Imath/FindImath.cmake create mode 100644 package-system/Imath/build_config.json create mode 100644 package-system/Imath/imath-config-version.cmake create mode 100644 package-system/Imath/imath-config.cmake create mode 100644 package-system/Imath/imath-test-android.cmd create mode 100755 package-system/Imath/imath-test-ios.sh create mode 100755 package-system/Imath/imath-test-linux.sh create mode 100755 package-system/Imath/imath-test-mac.sh create mode 100644 package-system/Imath/imath-test-windows.cmd create mode 100644 package-system/Imath/test/find-using-config/CMakeLists.txt create mode 100644 package-system/Imath/test/find-using-module/CMakeLists.txt create mode 100644 package-system/Imath/test/imathtest.cpp diff --git a/Scripts/cmake/o3de_package_utilities.cmake b/Scripts/cmake/o3de_package_utilities.cmake index 80d42e55..b6b724eb 100644 --- a/Scripts/cmake/o3de_package_utilities.cmake +++ b/Scripts/cmake/o3de_package_utilities.cmake @@ -80,7 +80,9 @@ function(o3de_import_targets) if (to_namespace_prefix) set(target_alias_name ${to_namespace_prefix}${component}) if(NOT "${target_alias_name}" STREQUAL "${component_target_name}") - add_library(${target_alias_name} ALIAS ${component_target_name}) + if (NOT TARGET ${target_alias_name}) + add_library(${target_alias_name} ALIAS ${component_target_name}) + endif() endif() endif() diff --git a/package-system/Imath/FindImath.cmake b/package-system/Imath/FindImath.cmake new file mode 100644 index 00000000..ab03d108 --- /dev/null +++ b/package-system/Imath/FindImath.cmake @@ -0,0 +1,11 @@ +# +# 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 +# +# + +# force this into config mode, so that it uses the config files instead of module files. +set(Imath_DIR ${CMAKE_CURRENT_LIST_DIR}) +find_package(Imath 3.2.2 REQUIRED CONFIG) diff --git a/package-system/Imath/build_config.json b/package-system/Imath/build_config.json new file mode 100644 index 00000000..bd914406 --- /dev/null +++ b/package-system/Imath/build_config.json @@ -0,0 +1,100 @@ +{ + "git_url":"https://github.com/AcademySoftwareFoundation/Imath.git", + "git_tag":"v3.2.2", + "package_name":"Imath", + "package_version":"3.2.2-rev2", + "package_url":"https://imath.readthedocs.io/en/latest/", + "package_license":"BSD-3-Clause", + "package_license_file":"Imath/LICENSE.md", + "cmake_build_args_common" : [ + "--parallel" + ], + "cmake_generate_args_common" : [ + "-DCMAKE_CXX_STANDARD=17", + "-DBUILD_SHARED_LIBS=FALSE", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DPYTHON=OFF", + "-DPYBIND11=OFF", + "-DBUILD_WEBSITE=OFF", + "-DBUILD_TESTING=OFF", + "-DCMAKE_DEBUG_POSTFIX=_d" + ], + "cmake_find_source" : "FindImath.cmake", + "cmake_find_target" : "FindImath.cmake", + "cmake_install_filter":[ + "*.h", + "*.lib", + "*.a" + ], + "extra_files_to_copy": [ + ["imath-config-version.cmake", "imath-config-version.cmake"], + ["imath-config.cmake", "imath-config.cmake"] + ], + "Platforms":{ + "Windows":{ + "Windows":{ + "cmake_generate_args" : ["-G\"Visual Studio 17 2022\""], + "build_configs" : ["Debug","Release"], + "custom_test_cmd" : [ + "imath-test-windows.cmd" + ] + }, + "Android":{ + "build_configs" : ["Release"], + "cmake_generate_args" : [ + "-G", + "\"Ninja Multi-Config\"", + "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Android/Toolchain_android.cmake" + ], + "custom_test_cmd" : [ + "imath-test-android.cmd" + ] + } + }, + "Darwin":{ + "Mac-arm64":{ + "build_configs" : ["Release"], + "cmake_generate_args": [ + "-G", "Xcode", + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Mac/Toolchain_mac.cmake" + ], + "custom_test_cmd" : [ + "./imath-test-mac.sh" + ] + }, + "iOS":{ + "build_configs" : ["Release"], + "cmake_generate_args": [ + "-G", "Xcode", + "-DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/iOS/Toolchain_ios.cmake" + ], + "custom_test_cmd" : [ + "./imath-test-ios.sh" + ] + } + }, + "Linux":{ + "Linux":{ + "build_configs" : ["Release"], + "cmake_generate_args": [ + "-G", + "\"Ninja Multi-Config\"" + ], + "custom_test_cmd" : [ + "./imath-test-linux.sh" + ] + }, + "Linux-aarch64": { + "build_configs" : ["Release"], + "cmake_generate_args": [ + "-G", + "\"Ninja Multi-Config\"" + ], + "custom_test_cmd" : [ + "./imath-test-linux.sh" + ] + } + } + } +} diff --git a/package-system/Imath/imath-config-version.cmake b/package-system/Imath/imath-config-version.cmake new file mode 100644 index 00000000..a2c4c033 --- /dev/null +++ b/package-system/Imath/imath-config-version.cmake @@ -0,0 +1,39 @@ +# +# 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 +# +# + +# this file is called to make sure that if we request a specific version +# we respond only to that version + +set(PACKAGE_VERSION 3.2.2) +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if (NOT ${PACKAGE_FIND_NAME} STREQUAL "Imath") + return() +endif() + +# if the requested is greater than 3.x.x we cannot provide it +if (PACKAGE_FIND_VERSION_COUNT GREATER 0 AND PACKAGE_FIND_VERSION_MAJOR GREATER 3) + return() +endif() + +# if the requested version is greater than 3.2.x we cannot provide it +if (PACKAGE_FIND_VERSION_COUNT GREATER 1 AND PACKAGE_FIND_VERSION_MINOR GREATER 2) + return() +endif() + +# if the requested version is greater than 3.2.2 we cannot provide it. +if (PACKAGE_FIND_VERSION_COUNT GREATER 2 AND PACKAGE_FIND_VERSION_PATCH GREATER 2) + return() +endif() + +if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) +endif() + +set(PACKAGE_VERSION_COMPATIBLE TRUE) diff --git a/package-system/Imath/imath-config.cmake b/package-system/Imath/imath-config.cmake new file mode 100644 index 00000000..27dd3624 --- /dev/null +++ b/package-system/Imath/imath-config.cmake @@ -0,0 +1,50 @@ +# +# 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 +# +# + +# we're trying to be a drop-in replacement for the FindImath.cmake +# this means not using O3DE-specific functions. + +set(Imath_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/Imath/include) +set(Imath_LIB_DIR ${CMAKE_CURRENT_LIST_DIR}/Imath/lib) +set(Imath_VERSION_STRING "3.2.2") +set(Imath_VERSION ${Imath_VERSION_STRING}) +set(Imath_FOUND True) + +if (NOT TARGET Imath::Imath) + add_library(Imath::Imath STATIC IMPORTED GLOBAL) + set_target_properties(Imath::Imath + PROPERTIES + IMPORTED_LOCATION ${Imath_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}Imath-3_2${CMAKE_STATIC_LIBRARY_SUFFIX} + ) + if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set_target_properties(Imath::Imath + PROPERTIES + IMPORTED_LOCATION_DEBUG ${Imath_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}Imath-3_2_d${CMAKE_STATIC_LIBRARY_SUFFIX} + ) + endif() + # frustratingly, some 3rd party libraries expect the include dir to be like + # #include + # while others expect + # #include + # so spoon feed it... + target_include_directories(Imath::Imath SYSTEM INTERFACE ${Imath_INCLUDE_DIRS} ${Imath_INCLUDE_DIRS}/Imath) + +endif() + +if (NOT TARGET 3rdParty::Imath::Imath) + add_library(3rdParty::Imath::Imath ALIAS Imath::Imath) +endif() + +# if we're not in O3DE, it's also extremely helpful to show a message to logs that indicate that this +# library was successfully picked up, as opposed to the system one. +# A good way to know if you're in O3DE or not is that O3DE sets various cache variables before +# calling find_package, specifically, LY_VERSION_ENGINE_NAME is always set very early: +if (NOT LY_VERSION_ENGINE_NAME) + message(STATUS "Using O3DE's Imath (${Imath_VERSION_STRING}) from ${CMAKE_CURRENT_LIST_DIR}") +endif() + diff --git a/package-system/Imath/imath-test-android.cmd b/package-system/Imath/imath-test-android.cmd new file mode 100644 index 00000000..64d775f5 --- /dev/null +++ b/package-system/Imath/imath-test-android.cmd @@ -0,0 +1,35 @@ +@rem # +@rem # Copyright (c) Contributors to the Open 3D Engine Project. +@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution. +@rem # +@rem # SPDX-License-Identifier: Apache-2.0 OR MIT +@rem # +@rem # + +rmdir /S /Q temp\build_test +mkdir temp\build_test + +@rem in this case, we really just want to make sure the package is found successfully + +@rem CMAKE demands forward slashes but PACKAGE_ROOT is in native path: +set "PACKAGE_ROOT=%PACKAGE_ROOT:\=/%" +set "DOWNLOADED_PACKAGE_FOLDERS=%DOWNLOADED_PACKAGE_FOLDERS:\=/%" + +cmake -S test/find-using-config -B temp/build_test/find-using-config ^ + -G Ninja ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Android/Toolchain_android.cmake ^ + -DCMAKE_MODULE_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" ^ + -DCMAKE_FIND_ROOT_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" || exit /b 1 + +cmake -S test/find-using-module -B temp/build_test/find-using-module ^ + -G Ninja ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Android/Toolchain_android.cmake ^ + -DCMAKE_MODULE_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" ^ + -DCMAKE_FIND_ROOT_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" || exit /b 1 + +cmake --build temp/build_test/find-using-config --config Release || exit /b 1 +cmake --build temp/build_test/find-using-module --config Release || exit /b 1 + +exit /b 0 diff --git a/package-system/Imath/imath-test-ios.sh b/package-system/Imath/imath-test-ios.sh new file mode 100755 index 00000000..75367631 --- /dev/null +++ b/package-system/Imath/imath-test-ios.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# 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 +# +# + +# in this case, we really just want to make sure the package is found successfully +# as it is mostly used as a header library + +rm -rf temp/build_test +mkdir temp/build_test + +cmake -S test/find-using-config -B temp/build_test/find-using-config \ + -G Xcode \ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/iOS/Toolchain_ios.cmake \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake -S test/find-using-module -B temp/build_test/find-using-module \ + -G Xcode \ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/iOS/Toolchain_ios.cmake \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake --build temp/build_test/find-using-config --config Release || exit 1 +cmake --build temp/build_test/find-using-module --config Release || exit 1 + +exit 0 diff --git a/package-system/Imath/imath-test-linux.sh b/package-system/Imath/imath-test-linux.sh new file mode 100755 index 00000000..accaa77d --- /dev/null +++ b/package-system/Imath/imath-test-linux.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# 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 +# +# + +# in this case, we really just want to make sure the package is found successfully + +rm -rf temp/build_test +mkdir temp/build_test + +cmake -S test/find-using-config -B temp/build_test/find-using-config \ + -G Ninja \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake -S test/find-using-module -B temp/build_test/find-using-module \ + -G Ninja \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake --build temp/build_test/find-using-config || exit 1 +cmake --build temp/build_test/find-using-module || exit 1 + +./temp/build_test/find-using-config/test_imath || exit 1 +./temp/build_test/find-using-module/test_imath || exit 1 + +exit 0 diff --git a/package-system/Imath/imath-test-mac.sh b/package-system/Imath/imath-test-mac.sh new file mode 100755 index 00000000..c08fd9ca --- /dev/null +++ b/package-system/Imath/imath-test-mac.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# 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 +# +# + +# in this case, we really just want to make sure the package is found successfully +# as it is mostly used as a header library + +rm -rf temp/build_test +mkdir temp/build_test + +cmake -S test/find-using-config -B temp/build_test/find-using-config \ + -G Xcode \ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Mac/Toolchain_mac.cmake \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake -S test/find-using-module -B temp/build_test/find-using-module \ + -G Xcode \ + -DCMAKE_TOOLCHAIN_FILE=../../../../Scripts/cmake/Platform/Mac/Toolchain_mac.cmake \ + -DCMAKE_MODULE_PATH="$DOWNLOADED_PACKAGE_FOLDERS;$PACKAGE_ROOT" \ + -DCMAKE_BUILD_TYPE=Release || exit 1 + +cmake --build temp/build_test/find-using-config --config Release || exit 1 +cmake --build temp/build_test/find-using-module --config Release || exit 1 + +./temp/build_test/find-using-config/Release/test_imath || exit 1 +./temp/build_test/find-using-module/Release/test_imath || exit 1 + +exit 0 diff --git a/package-system/Imath/imath-test-windows.cmd b/package-system/Imath/imath-test-windows.cmd new file mode 100644 index 00000000..b408adcb --- /dev/null +++ b/package-system/Imath/imath-test-windows.cmd @@ -0,0 +1,37 @@ +@rem # +@rem # Copyright (c) Contributors to the Open 3D Engine Project. +@rem # For complete copyright and license terms please see the LICENSE at the root of this distribution. +@rem # +@rem # SPDX-License-Identifier: Apache-2.0 OR MIT +@rem # +@rem # + +rmdir /S /Q temp\build_test +mkdir temp\build_test + +@rem in this case, we really just want to make sure the package is found successfully + +@rem CMAKE demands forward slashes but PACKAGE_ROOT is in native path: +set "PACKAGE_ROOT=%PACKAGE_ROOT:\=/%" +set "DOWNLOADED_PACKAGE_FOLDERS=%DOWNLOADED_PACKAGE_FOLDERS:\=/%" + +cmake -S test/find-using-config -B temp/build_test/find-using-config ^ + -G "Visual Studio 17 2022" ^ + -DCMAKE_MODULE_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" || exit /b 1 + +cmake -S test/find-using-module -B temp/build_test/find-using-module ^ + -G "Visual Studio 17 2022" ^ + -DCMAKE_MODULE_PATH="%DOWNLOADED_PACKAGE_FOLDERS%;%PACKAGE_ROOT%" || exit /b 1 + +cmake --build temp/build_test/find-using-config --config Release || exit /b 1 +cmake --build temp/build_test/find-using-config --config Debug || exit /b 1 +cmake --build temp/build_test/find-using-module --config Release || exit /b 1 +cmake --build temp/build_test/find-using-module --config Debug || exit /b 1 + +temp\build_test\find-using-config\Release\test_imath.exe || exit /b 1 +temp\build_test\find-using-config\Debug\test_imath.exe || exit /b 1 +temp\build_test\find-using-module\Release\test_imath.exe || exit /b 1 +temp\build_test\find-using-module\Debug\test_imath.exe || exit /b 1 + + +exit /b 0 diff --git a/package-system/Imath/test/find-using-config/CMakeLists.txt b/package-system/Imath/test/find-using-config/CMakeLists.txt new file mode 100644 index 00000000..ba479d2a --- /dev/null +++ b/package-system/Imath/test/find-using-config/CMakeLists.txt @@ -0,0 +1,28 @@ +# +# 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_minimum_required(VERSION 3.20) + +PROJECT(test_imath VERSION 1.0 LANGUAGES C CXX) + +# Necessary to override iOS toolchain behavior of +# setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY, which prevents it from looking for packages +# anywhere except in the sysroot (ie, inside xcode's ios SDK subfolder). +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH) + +#ask for a lower version get the new one just to make sure the comparison works right. +find_package(Imath CONFIG 3.1.1 REQUIRED) + +add_executable(test_imath ${CMAKE_CURRENT_LIST_DIR}/../imathtest.cpp) +target_link_libraries(test_imath Imath::Imath) + +set_target_properties(test_expat PROPERTIES + XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED OFF + MACOSX_BUNDLE TRUE + XCODE_ATTRIBUTE_EXECUTABLE_NAME "test_imath") + diff --git a/package-system/Imath/test/find-using-module/CMakeLists.txt b/package-system/Imath/test/find-using-module/CMakeLists.txt new file mode 100644 index 00000000..cb8624dd --- /dev/null +++ b/package-system/Imath/test/find-using-module/CMakeLists.txt @@ -0,0 +1,21 @@ +# +# 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_minimum_required(VERSION 3.20) + +PROJECT(test_imath VERSION 1.0 LANGUAGES C CXX) + +find_package(Imath MODULE REQUIRED) + +add_executable(test_imath ${CMAKE_CURRENT_LIST_DIR}/../imathtest.cpp) +target_link_libraries(test_imath PRIVATE Imath::Imath) + +set_target_properties(test_imath PROPERTIES + XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED OFF + MACOSX_BUNDLE TRUE + XCODE_ATTRIBUTE_EXECUTABLE_NAME "test_imath") diff --git a/package-system/Imath/test/imathtest.cpp b/package-system/Imath/test/imathtest.cpp new file mode 100644 index 00000000..a167a06b --- /dev/null +++ b/package-system/Imath/test/imathtest.cpp @@ -0,0 +1,46 @@ +/* + 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 +*/ + +#include +#include +#include + +// Some libraries also include without the prefix +// Make sure we're compatible. +#include +#include + +#include + +using namespace Imath; + +int main() +{ + // Really just an ultra basic test to make sure the includes and linkage works. + + Imath::M44f m; + m.makeIdentity(); + m *= 4.0f; + if (fabs(4.0f - m[0][0]) > 0.01f) + { + printf("Test failed - expected 4.0f, got %f\n", m[0][0]); + return 1; + } + printf("Sanity test pass for Imath::M44f\n"); + Imath::half h(1.0f); + float hValue = h; + + if (fabs(1.0f - hValue) > 0.01f) + { + printf("Test failed - expected 1.0f, got %f\n", hValue); + return 1; + } + printf("Sanity test pass for Imath::half\n"); + printf("All is ok\n"); + + return 0; +} \ No newline at end of file diff --git a/package_build_list_host_darwin-arm64.json b/package_build_list_host_darwin-arm64.json index d36b12df..12dfdffd 100644 --- a/package_build_list_host_darwin-arm64.json +++ b/package_build_list_host_darwin-arm64.json @@ -20,6 +20,8 @@ "mcpp-2.7.2_az.2-rev3-mac-arm64": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.2-rev3", "mikkelsen-1.0.0.5-mac-arm64": "package-system/mikkelsen/build_package_image.py --platform mac-arm64", "NvCloth-v1.1.6-rev1-mac-arm64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/NvCloth --platform-name Mac-arm64 --clean", + "Imath-3.2.2-rev2-mac-arm64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name Mac-arm64 --clean", + "Imath-3.2.2-rev2-ios": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name iOS --clean", "OpenEXR-3.4.4-rev1-mac-arm64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenEXR --platform-name Mac-arm64 --clean", "openimageio-opencolorio-2.3.17-rev4-mac-arm64": "package-system/openimageio-opencolorio/build_openimageio.py --platform darwin-arm64 --package-name=openimageio-opencolorio-2.3.17-rev4-mac-arm64 --clean", "OpenSSL-3.6.3-rev1-mac-arm64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenSSL --platform-name Mac-arm64 --clean", @@ -54,6 +56,8 @@ "mcpp-2.7.2_az.2-rev3-mac-arm64": "package-system/temp/mcpp-mac-arm64", "mikkelsen-1.0.0.5-mac-arm64": "package-system/mikkelsen-mac-arm64", "NvCloth-v1.1.6-rev1-mac-arm64": "package-system/NvCloth/temp/NvCloth-mac-arm64", + "Imath-3.2.2-rev2-mac-arm64": "package-system/Imath/temp/Imath-mac-arm64", + "Imath-3.2.2-rev2-ios": "package-system/Imath/temp/Imath-ios", "OpenEXR-3.4.4-rev1-mac-arm64": "package-system/OpenEXR/temp/OpenEXR-mac-arm64", "openimageio-opencolorio-2.3.17-rev4-mac-arm64": "package-system/openimageio-opencolorio/temp/package-darwin-arm64", "OpenSSL-3.6.3-rev1-mac-arm64": "package-system/OpenSSL/temp/OpenSSL-mac-arm64", diff --git a/package_build_list_host_linux-aarch64.json b/package_build_list_host_linux-aarch64.json index d61d400e..8b75a3cc 100644 --- a/package_build_list_host_linux-aarch64.json +++ b/package_build_list_host_linux-aarch64.json @@ -23,6 +23,7 @@ "mcpp-2.7.2_az.1-rev1-linux-aarch64": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1", "mikkelsen-1.0.0.4-linux-aarch64": "package-system/mikkelsen/build_package_image.py --platform linux-aarch64", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux-aarch64": "package-system/NvCloth/build_package_image.py --platform-name linux-aarch64", + "Imath-3.2.2-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name Linux-aarch64 --clean", "OpenEXR-3.1.3-rev4-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenEXR --platform-name Linux-aarch64 --clean", "openimageio-opencolorio-2.3.17-rev2-linux-aarch64": "package-system/openimageio-opencolorio/build_openimageio.py --package-name=openimageio-opencolorio-2.3.17-rev2-linux-aarch64 --platform linux-aarch64 --clean", "OpenMesh-8.1-rev3-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenMesh --platform-name Linux-aarch64 --clean", @@ -63,6 +64,7 @@ "mikkelsen-1.0.0.4-linux-aarch64": "package-system/mikkelsen-linux-aarch64", "mcpp-2.7.2_az.1-rev1-linux-aarch64": "package-system/mcpp-linux-aarch64", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux-aarch64": "package-system/NvCloth-linux-aarch64", + "Imath-3.2.2-rev2-linux-aarch64": "package-system/Imath/temp/Imath-linux-aarch64", "OpenEXR-3.1.3-rev4-linux-aarch64": "package-system/OpenEXR/temp/OpenEXR-linux-aarch64", "openimageio-opencolorio-2.3.17-rev2-linux-aarch64": "package-system/openimageio-opencolorio/temp/package-linux-aarch64", "OpenMesh-8.1-rev3-linux-aarch64": "package-system/OpenMesh/temp/OpenMesh-linux-aarch64", diff --git a/package_build_list_host_linux.json b/package_build_list_host_linux.json index 1649ee58..7c60d850 100644 --- a/package_build_list_host_linux.json +++ b/package_build_list_host_linux.json @@ -24,6 +24,7 @@ "pyside2-5.15.2.1-py3.10-rev7-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/pyside2 --platform-name Linux --package-root ../../package-system/pyside2/temp --clean", "pyside2-5.15.2.1-py3.10-rev7-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/pyside2 --platform-name Linux-aarch64 --package-root ../../package-system/pyside2/temp --clean", "pyside6-6.10.2-py3.10-rev5-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/pyside6 --platform-name Linux --clean", + "Imath-3.2.2-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name Linux --clean", "OpenEXR-3.1.3-rev4-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenEXR --platform-name Linux --package-root ../../package-system/OpenEXR/temp --clean", "OpenXR-1.0.22-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenXR --platform-name Linux --package-root ../../package-system --clean", "openimageio-opencolorio-2.3.17-rev2-linux": "package-system/openimageio-opencolorio/build_openimageio.py --package-name=openimageio-opencolorio-2.3.17-rev2-linux --clean", @@ -73,6 +74,7 @@ "pyside2-5.15.2.1-py3.10-rev7-linux": "package-system/pyside2/temp/pyside2-linux", "pyside2-5.15.2.1-py3.10-rev7-linux-aarch64": "package-system/pyside2/temp/pyside2-linux-aarch64", "pyside6-6.10.2-py3.10-rev5-linux": "package-system/pyside6/temp/pyside6-linux", + "Imath-3.2.2-rev2-linux": "package-system/Imath/temp/Imath-linux", "OpenEXR-3.1.3-rev4-linux": "package-system/OpenEXR/temp/OpenEXR-linux", "OpenXR-1.0.22-rev2-linux": "package-system/OpenXR-linux", "openimageio-opencolorio-2.3.17-rev2-linux": "package-system/openimageio-opencolorio/temp/package-linux", diff --git a/package_build_list_host_windows.json b/package_build_list_host_windows.json index 30de7211..0506d258 100644 --- a/package_build_list_host_windows.json +++ b/package_build_list_host_windows.json @@ -36,6 +36,8 @@ "mikkelsen-1.0.0.4-windows": "package-system/mikkelsen/build_package_image.py", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows": "package-system/NvCloth/build_package_image.py --platform-name windows", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-android": "package-system/NvCloth/build_package_image.py --platform-name android", + "Imath-3.2.2-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name Windows --clean", + "Imath-3.2.2-rev2-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Imath --platform-name Android --clean", "OpenEXR-3.1.3-rev5-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenEXR --platform-name Windows --package-root ../../package-system/OpenEXR/temp --clean", "openimageio-opencolorio-2.3.17-rev4-windows": "package-system/openimageio-opencolorio/build_openimageio.py --package-name=openimageio-opencolorio-2.3.17-rev4-windows", "OpenMesh-8.1-rev3-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/OpenMesh --platform-name Windows --package-root ../../package-system --clean", @@ -108,6 +110,8 @@ "mikkelsen-1.0.0.4-windows": "package-system/mikkelsen-windows", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows": "package-system/NvCloth-windows", "NvCloth-v1.1.6-4-gd243404-pr58-rev1-android": "package-system/NvCloth-android", + "Imath-3.2.2-rev2-windows": "package-system/Imath/temp/Imath-windows", + "Imath-3.2.2-rev2-android": "package-system/Imath/temp/Imath-android", "OpenEXR-3.1.3-rev5-windows": "package-system/OpenEXR/temp/OpenEXR-windows", "openimageio-opencolorio-2.3.17-rev4-windows": "package-system/openimageio-opencolorio/temp/package-windows", "OpenMesh-8.1-rev3-windows": "package-system/OpenMesh-windows", From b21b9d14a256aa7a0398e5ca0b6d83cccad6c2b1 Mon Sep 17 00:00:00 2001 From: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:27:33 -0700 Subject: [PATCH 2/3] Fix a copy and paste error Signed-off-by: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> --- package-system/Imath/test/find-using-config/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-system/Imath/test/find-using-config/CMakeLists.txt b/package-system/Imath/test/find-using-config/CMakeLists.txt index ba479d2a..abc08b16 100644 --- a/package-system/Imath/test/find-using-config/CMakeLists.txt +++ b/package-system/Imath/test/find-using-config/CMakeLists.txt @@ -21,7 +21,7 @@ find_package(Imath CONFIG 3.1.1 REQUIRED) add_executable(test_imath ${CMAKE_CURRENT_LIST_DIR}/../imathtest.cpp) target_link_libraries(test_imath Imath::Imath) -set_target_properties(test_expat PROPERTIES +set_target_properties(test_imath PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED OFF MACOSX_BUNDLE TRUE XCODE_ATTRIBUTE_EXECUTABLE_NAME "test_imath") From 3456d543beae6c2829a5cec23139f99fc8eca1ed Mon Sep 17 00:00:00 2001 From: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:51:50 -0700 Subject: [PATCH 3/3] Update binary path for mac now that its a app package Signed-off-by: Nicholas Lawson <70027408+nick-l-o3de@users.noreply.github.com> --- package-system/Imath/imath-test-mac.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-system/Imath/imath-test-mac.sh b/package-system/Imath/imath-test-mac.sh index c08fd9ca..bee2e468 100755 --- a/package-system/Imath/imath-test-mac.sh +++ b/package-system/Imath/imath-test-mac.sh @@ -28,7 +28,7 @@ cmake -S test/find-using-module -B temp/build_test/find-using-module \ cmake --build temp/build_test/find-using-config --config Release || exit 1 cmake --build temp/build_test/find-using-module --config Release || exit 1 -./temp/build_test/find-using-config/Release/test_imath || exit 1 -./temp/build_test/find-using-module/Release/test_imath || exit 1 +./temp/build_test/find-using-config/Release/test_imath.app/Contents/MacOS/test_imath || exit 1 +./temp/build_test/find-using-module/Release/test_imath.app/Contents/MacOS/test_imath || exit 1 exit 0