CMakeLists.txt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
  10. ly_add_target(
  11. NAME ${gem_name}.Static STATIC
  12. NAMESPACE Gem
  13. FILES_CMAKE
  14. twitch_files.cmake
  15. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  16. INCLUDE_DIRECTORIES
  17. PRIVATE
  18. Source
  19. ${pal_source_dir}
  20. PUBLIC
  21. Include
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. AZ::AzCore
  25. Gem::HttpRequestor
  26. 3rdParty::AWSNativeSDK::Core
  27. RUNTIME_DEPENDENCIES
  28. Gem::HttpRequestor
  29. )
  30. ly_add_target(
  31. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  32. NAMESPACE Gem
  33. FILES_CMAKE
  34. twitch_shared_files.cmake
  35. INCLUDE_DIRECTORIES
  36. PRIVATE
  37. Source
  38. PUBLIC
  39. Include
  40. BUILD_DEPENDENCIES
  41. PRIVATE
  42. Gem::${gem_name}.Static
  43. RUNTIME_DEPENDENCIES
  44. Gem::HttpRequestor
  45. )
  46. # Inject the gem name into the Module source file
  47. ly_add_source_properties(
  48. SOURCES
  49. Source/TwitchModule.cpp
  50. PROPERTY COMPILE_DEFINITIONS
  51. VALUES
  52. O3DE_GEM_NAME=${gem_name}
  53. O3DE_GEM_VERSION=${gem_version})
  54. # the above module is for use in all application types except builders
  55. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  56. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  57. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  58. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})