CMakeLists.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. ly_add_target(
  10. NAME ${gem_name}.Static STATIC
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. awsclientauth_files.cmake
  14. INCLUDE_DIRECTORIES
  15. PUBLIC
  16. Include
  17. PRIVATE
  18. Source
  19. BUILD_DEPENDENCIES
  20. PRIVATE
  21. AZ::AzCore
  22. AZ::AzFramework
  23. Gem::AWSCore
  24. Gem::HttpRequestor
  25. 3rdParty::AWSNativeSDK::AWSClientAuth
  26. 3rdParty::AWSNativeSDK::Core
  27. )
  28. ly_add_target(
  29. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  30. NAMESPACE Gem
  31. FILES_CMAKE
  32. awsclientauth_shared_files.cmake
  33. INCLUDE_DIRECTORIES
  34. PRIVATE
  35. Source
  36. BUILD_DEPENDENCIES
  37. PRIVATE
  38. AZ::AzCore
  39. AZ::AzFramework
  40. Gem::AWSCore
  41. 3rdParty::AWSNativeSDK::AWSClientAuth
  42. 3rdParty::AWSNativeSDK::Core
  43. PUBLIC
  44. Gem::${gem_name}.Static
  45. )
  46. # Inject the gem name into the Module source file
  47. ly_add_source_properties(
  48. SOURCES
  49. Source/AWSClientAuthModule.cpp
  50. PROPERTY COMPILE_DEFINITIONS
  51. VALUES
  52. O3DE_GEM_NAME=${gem_name}
  53. O3DE_GEM_VERSION=${gem_version})
  54. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  55. ly_add_target(
  56. NAME ${gem_name}.Editor ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  57. NAMESPACE Gem
  58. FILES_CMAKE
  59. awsclientauth_editor_files.cmake
  60. awsclientauth_shared_files.cmake
  61. INCLUDE_DIRECTORIES
  62. PRIVATE
  63. Include
  64. Source
  65. COMPILE_DEFINITIONS
  66. PRIVATE
  67. AWSCLIENTAUTH_EDITOR
  68. BUILD_DEPENDENCIES
  69. PRIVATE
  70. AZ::AzCore
  71. AZ::AzFramework
  72. AZ::AzToolsFramework
  73. Gem::AWSCore
  74. Gem::HttpRequestor
  75. 3rdParty::AWSNativeSDK::AWSClientAuth
  76. 3rdParty::AWSNativeSDK::Core
  77. RUNTIME_DEPENDENCIES
  78. Gem::${gem_name}
  79. )
  80. endif()
  81. # Load the "Gem::${gem_name}" module in all types of applications.
  82. ly_create_alias(
  83. NAME ${gem_name}.Servers
  84. NAMESPACE Gem
  85. TARGETS
  86. Gem::${gem_name}
  87. Gem::AWSCore.Servers
  88. Gem::HttpRequestor.Servers
  89. )
  90. ly_create_alias(
  91. NAME ${gem_name}.Clients
  92. NAMESPACE Gem
  93. TARGETS
  94. Gem::${gem_name}
  95. Gem::AWSCore.Clients
  96. Gem::HttpRequestor.Clients
  97. )
  98. ly_create_alias(
  99. NAME ${gem_name}.Unified
  100. NAMESPACE Gem
  101. TARGETS
  102. Gem::${gem_name}
  103. Gem::AWSCore.Unified
  104. Gem::HttpRequestor.Unified
  105. )
  106. if (PAL_TRAIT_BUILD_HOST_TOOLS)
  107. ly_create_alias(
  108. NAME ${gem_name}.Tools
  109. NAMESPACE Gem
  110. TARGETS
  111. Gem::${gem_name}.Editor
  112. Gem::AWSCore.Tools
  113. Gem::HttpRequestor.Tools
  114. )
  115. ly_create_alias(
  116. NAME ${gem_name}.Builders
  117. NAMESPACE Gem
  118. TARGETS
  119. Gem::${gem_name}
  120. Gem::AWSCore.Builders
  121. Gem::HttpRequestor.Builders
  122. )
  123. endif()
  124. ################################################################################
  125. # Tests
  126. ################################################################################
  127. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  128. ly_add_target(
  129. NAME ${gem_name}.Tests MODULE
  130. NAMESPACE Gem
  131. FILES_CMAKE
  132. awsclientauth_test_files.cmake
  133. INCLUDE_DIRECTORIES
  134. PRIVATE
  135. Source
  136. Include
  137. Tests
  138. BUILD_DEPENDENCIES
  139. PRIVATE
  140. AZ::AzTest
  141. 3rdParty::AWSNativeSDK::AWSClientAuth
  142. AZ::AzCore
  143. AZ::AzFramework
  144. AZ::AWSNativeSDKTestLibs
  145. Gem::${gem_name}.Static
  146. Gem::AWSCore
  147. Gem::HttpRequestor
  148. RUNTIME_DEPENDENCIES
  149. Gem::AWSCore
  150. Gem::HttpRequestor
  151. )
  152. ly_add_googletest(
  153. NAME Gem::${gem_name}.Tests
  154. LABELS REQUIRES_tiaf
  155. )
  156. endif()