CMakeLists.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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}.Headers HEADERONLY
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. presence_files.cmake
  14. INCLUDE_DIRECTORIES
  15. INTERFACE
  16. Include
  17. BUILD_DEPENDENCIES
  18. INTERFACE
  19. AZ::AzCore
  20. AZ::AzFramework
  21. )
  22. ly_add_target(
  23. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  24. NAMESPACE Gem
  25. PLATFORM_INCLUDE_FILES
  26. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  27. FILES_CMAKE
  28. presence_shared_files.cmake
  29. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  30. INCLUDE_DIRECTORIES
  31. PRIVATE
  32. Source
  33. PUBLIC
  34. Include
  35. BUILD_DEPENDENCIES
  36. PRIVATE
  37. AZ::AzCore
  38. AZ::AzFramework
  39. Gem::${gem_name}.Headers
  40. )
  41. # Inject the gem name into the Module source file
  42. ly_add_source_properties(
  43. SOURCES
  44. Source/PresenceModule.cpp
  45. PROPERTY COMPILE_DEFINITIONS
  46. VALUES
  47. O3DE_GEM_NAME=${gem_name}
  48. O3DE_GEM_VERSION=${gem_version})
  49. # we activate the presence gem (if enabled) only on client applications such as the launcher:
  50. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})