CMakeLists.txt 1.5 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}.Static STATIC
  11. NAMESPACE Gem
  12. PLATFORM_INCLUDE_FILES
  13. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  14. FILES_CMAKE
  15. achievements_files.cmake
  16. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  17. INCLUDE_DIRECTORIES
  18. PUBLIC
  19. Include
  20. PRIVATE
  21. Source
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. AZ::AzCore
  25. AZ::AzFramework
  26. )
  27. ly_add_target(
  28. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  29. NAMESPACE Gem
  30. FILES_CMAKE
  31. achievements_shared_files.cmake
  32. INCLUDE_DIRECTORIES
  33. PUBLIC
  34. Include
  35. PRIVATE
  36. Source
  37. BUILD_DEPENDENCIES
  38. PRIVATE
  39. Gem::${gem_name}.Static
  40. )
  41. # Inject the gem name into the Module source file
  42. ly_add_source_properties(
  43. SOURCES
  44. Source/AchievementsModule.cpp
  45. PROPERTY COMPILE_DEFINITIONS
  46. VALUES
  47. O3DE_GEM_NAME=${gem_name}
  48. O3DE_GEM_VERSION=${gem_version})
  49. # we'll load the above "Gem::Achievements" module in clients only.
  50. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})