CMakeLists.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. if (NOT PAL_TRAIT_BUILD_HOST_TOOLS)
  9. return()
  10. endif()
  11. ly_add_target(
  12. NAME ${gem_name}.Static STATIC
  13. NAMESPACE Gem
  14. FILES_CMAKE
  15. sceneloggingexample_files.cmake
  16. INCLUDE_DIRECTORIES
  17. PRIVATE
  18. .
  19. BUILD_DEPENDENCIES
  20. PUBLIC
  21. AZ::AzCore
  22. AZ::SceneCore
  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. sceneloggingexample_shared_files.cmake
  30. INCLUDE_DIRECTORIES
  31. PRIVATE
  32. .
  33. BUILD_DEPENDENCIES
  34. PRIVATE
  35. Gem::${gem_name}.Static
  36. )
  37. # Inject the gem name into the Module source file
  38. ly_add_source_properties(
  39. SOURCES
  40. SceneLoggingExampleModule.cpp
  41. PROPERTY COMPILE_DEFINITIONS
  42. VALUES
  43. O3DE_GEM_NAME=${gem_name}
  44. O3DE_GEM_VERSION=${gem_version})
  45. # the ${gem_name} module above is only used in Builders and Tools by default.
  46. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name})
  47. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})