BuiltInPackages.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. # this file allows you to specify download and find_package commands for
  9. # packages which apply to all platforms (usually header-only)
  10. # individual platforms can enumerate packages in for example
  11. # cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake
  12. #include the platform-specific 3rd party packages.
  13. o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${O3DE_ENGINE_RESTRICTED_PATH}" "${LY_ROOT_FOLDER}")
  14. set(LY_PAL_PACKAGE_FILE_NAME ${pal_dir}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}${LY_ARCHITECTURE_NAME_EXTENSION}.cmake)
  15. include(${LY_PAL_PACKAGE_FILE_NAME})
  16. # add the above file to the ALLFILES list, so that they show up in IDEs
  17. set(ALLFILES ${ALLFILES} ${LY_PAL_PACKAGE_FILE_NAME})
  18. # temporary compatibility:
  19. # Some 3p libraries may still refer to zlib as "3rdParty::zlib" instead of
  20. # the correct "3rdParty::ZLIB" (Case difference). Until those libraries are updated
  21. # we alias the casing here. This also provides backward compatibility for Gems that use 3rdParty::zlib
  22. # that are not part of the core O3DE repo.
  23. if (NOT O3DE_SCRIPT_ONLY)
  24. ly_download_associated_package(ZLIB)
  25. find_package(ZLIB)
  26. else()
  27. add_library(3rdParty::ZLIB IMPORTED INTERFACE GLOBAL)
  28. endif()
  29. add_library(3rdParty::zlib ALIAS 3rdParty::ZLIB)