CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. ly_add_target(
  10. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. atomfont_files.cmake
  14. ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  15. INCLUDE_DIRECTORIES
  16. PUBLIC
  17. Include
  18. Source
  19. BUILD_DEPENDENCIES
  20. PRIVATE
  21. 3rdParty::Freetype
  22. AZ::AzCore
  23. AZ::AtomCore
  24. Legacy::CryCommon
  25. Gem::Atom_RHI.Reflect
  26. Gem::Atom_RPI.Public
  27. PUBLIC
  28. Gem::Atom_AtomBridge.Static
  29. )
  30. # Inject the gem name into the Module source file
  31. ly_add_source_properties(
  32. SOURCES
  33. Source/Module.cpp
  34. PROPERTY COMPILE_DEFINITIONS
  35. VALUES
  36. O3DE_GEM_NAME=${gem_name}
  37. O3DE_GEM_VERSION=${gem_version})
  38. ################################################################################
  39. # Tests
  40. ################################################################################
  41. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  42. ly_add_target(
  43. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  44. NAMESPACE Gem
  45. FILES_CMAKE
  46. atomfont_test_files.cmake
  47. INCLUDE_DIRECTORIES
  48. PRIVATE
  49. Include
  50. Tests
  51. BUILD_DEPENDENCIES
  52. PRIVATE
  53. AZ::AzTest
  54. )
  55. ly_add_googletest(
  56. NAME Gem::${gem_name}.Tests
  57. LABELS REQUIRES_tiaf
  58. )
  59. endif()