CMakeLists.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. ly_add_target(
  9. NAME ${gem_name}.Static STATIC
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. gestures_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PRIVATE
  15. Source
  16. PUBLIC
  17. Include
  18. BUILD_DEPENDENCIES
  19. PUBLIC
  20. Gem::Atom_RPI.Public
  21. AZ::AtomCore
  22. PRIVATE
  23. Legacy::CryCommon
  24. )
  25. ly_add_target(
  26. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  27. NAMESPACE Gem
  28. FILES_CMAKE
  29. gestures_shared_files.cmake
  30. INCLUDE_DIRECTORIES
  31. PRIVATE
  32. Source
  33. PUBLIC
  34. Include
  35. BUILD_DEPENDENCIES
  36. PRIVATE
  37. Legacy::CryCommon
  38. Gem::${gem_name}.Static
  39. )
  40. # Inject the gem name into the Module source file
  41. ly_add_source_properties(
  42. SOURCES
  43. Source/GesturesModule.cpp
  44. PROPERTY COMPILE_DEFINITIONS
  45. VALUES
  46. O3DE_GEM_NAME=${gem_name}
  47. O3DE_GEM_VERSION=${gem_version})
  48. # All types of applications use the same module.
  49. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS ${gem_name})
  50. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS ${gem_name})
  51. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS ${gem_name})
  52. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS ${gem_name})
  53. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS ${gem_name})
  54. ################################################################################
  55. # Tests
  56. ################################################################################
  57. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  58. ly_add_target(
  59. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  60. NAMESPACE Gem
  61. FILES_CMAKE
  62. gestures_test_files.cmake
  63. INCLUDE_DIRECTORIES
  64. PRIVATE
  65. Tests
  66. Source
  67. BUILD_DEPENDENCIES
  68. PRIVATE
  69. AZ::AzTest
  70. Legacy::CryCommon
  71. Gem::${gem_name}.Static
  72. )
  73. ly_add_googletest(
  74. NAME Gem::${gem_name}.Tests
  75. LABELS REQUIRES_tiaf
  76. )
  77. endif()