From 61618e66d3f459f771e3351b38923b33809031f8 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Wed, 15 Sep 2021 12:41:08 -0700 Subject: [PATCH] Fixed a build dependency issue between libpng and zlib on android, thanks to suggestion from @lumberyard-employee-dm Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- Gems/Atom/Feature/Common/Code/CMakeLists.txt | 7 ------- Gems/Atom/Utils/Code/CMakeLists.txt | 1 - .../Platform/Android/BuiltInPackages_android.cmake | 2 +- .../Platform/Windows/BuiltInPackages_windows.cmake | 2 +- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/CMakeLists.txt b/Gems/Atom/Feature/Common/Code/CMakeLists.txt index 3a38aefe02..b8c414dcc6 100644 --- a/Gems/Atom/Feature/Common/Code/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/Code/CMakeLists.txt @@ -83,13 +83,6 @@ ly_add_target( Include BUILD_DEPENDENCIES PRIVATE - # For some reason zlib and libpng need to be declared here, otherwise libAtom_Feature_Common.so will fail to link - # when building for Android. These libraries are appropriately indicated in Atom/Utils's CCmakeLists.txt and those dependencies are - # supposed to be inherited here through the PUBLIC dependencies chaining ... but something is amiss. libpng and zlib were both - # appearing in the link command so it isn't clear why it was failing. Perhaps it was because libpng appeared before zlib - # in the link command? Somehow repeating them here works around this issue. - 3rdParty::libpng - 3rdParty::zlib AZ::AzCore AZ::AzFramework Gem::Atom_Feature_Common.Static diff --git a/Gems/Atom/Utils/Code/CMakeLists.txt b/Gems/Atom/Utils/Code/CMakeLists.txt index 0781100e9a..89bc8dd0a5 100644 --- a/Gems/Atom/Utils/Code/CMakeLists.txt +++ b/Gems/Atom/Utils/Code/CMakeLists.txt @@ -24,7 +24,6 @@ ly_add_target( Gem::Atom_RHI.Public PUBLIC Gem::Atom_RHI.Reflect - 3rdParty::zlib 3rdParty::libpng ) diff --git a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake index 333b9a5444..297707adf1 100644 --- a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake +++ b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake @@ -24,7 +24,7 @@ ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-android TARGETS Phy ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-android TARGETS mikkelsen PACKAGE_HASH 075e8e4940884971063b5a9963014e2e517246fa269c07c7dc55b8cf2cd99705) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-android TARGETS googletest PACKAGE_HASH 95671be75287a61c9533452835c3647e9c1b30f81b34b43bcb0ec1997cc23894) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-android TARGETS GoogleBenchmark PACKAGE_HASH 20b46e572211a69d7d94ddad1c89ec37bb958711d6ad4025368ac89ea83078fb) -ly_associate_package(PACKAGE_NAME libpng-1.6.37-android TARGETS libpng PACKAGE_HASH 72be3859de38559ed45e4383bc480ad9cc1c080fea2c4d6dd3946c2fb22ad5bb) +ly_associate_package(PACKAGE_NAME libpng-1.6.37-rev1-android TARGETS libpng PACKAGE_HASH 51d3ec1559c5595196c11e11674cf5745989d3073bf33dabc6697e3eee77a1cc) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-android TARGETS libsamplerate PACKAGE_HASH bf13662afe65d02bcfa16258a4caa9b875534978227d6f9f36c9cfa92b3fb12b) ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev1-android TARGETS OpenSSL PACKAGE_HASH 4036d4019d722f0e1b7a1621bf60b5a17ca6a65c9c78fd8701cee1131eec8480) ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev2-android TARGETS zlib PACKAGE_HASH 85b730b97176772538cfcacd6b6aaf4655fc2d368d134d6dd55e02f28f183826) diff --git a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake index ba5658df0e..a6fb3fbddc 100644 --- a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake +++ b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake @@ -42,7 +42,7 @@ ly_associate_package(PACKAGE_NAME d3dx12-headers-rev1-windows ly_associate_package(PACKAGE_NAME pyside2-qt-5.15.1-rev2-windows TARGETS pyside2 PACKAGE_HASH c90f3efcc7c10e79b22a33467855ad861f9dbd2e909df27a5cba9db9fa3edd0f) ly_associate_package(PACKAGE_NAME openimageio-2.1.16.0-rev2-windows TARGETS OpenImageIO PACKAGE_HASH 85a2a6cf35cbc4c967c56ca8074babf0955c5b490c90c6e6fd23c78db99fc282) ly_associate_package(PACKAGE_NAME qt-5.15.2-rev4-windows TARGETS Qt PACKAGE_HASH a4634caaf48192cad5c5f408504746e53d338856148285057274f6a0ccdc071d) -ly_associate_package(PACKAGE_NAME libpng-1.6.37-windows TARGETS libpng PACKAGE_HASH 011079ecbc09c22852eecd860c70dd89f8c2f923c09be87fec4e18ce1e55d4e7) +ly_associate_package(PACKAGE_NAME libpng-1.6.37-rev1-windows TARGETS libpng PACKAGE_HASH aa20c894fbd7cdaea585a54e37620b3454a7e414a58128acd68ccf6fe76c47d6) ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-windows TARGETS libsamplerate PACKAGE_HASH dcf3c11a96f212a52e2c9241abde5c364ee90b0f32fe6eeb6dcdca01d491829f) ly_associate_package(PACKAGE_NAME OpenMesh-8.1-rev1-windows TARGETS OpenMesh PACKAGE_HASH 1c1df639358526c368e790dfce40c45cbdfcfb1c9a041b9d7054a8949d88ee77) ly_associate_package(PACKAGE_NAME civetweb-1.8-rev1-windows TARGETS civetweb PACKAGE_HASH 36d0e58a59bcdb4dd70493fb1b177aa0354c945b06c30416348fd326cf323dd4)