CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. # data portion
  9. ly_add_target(
  10. NAME ${gem_name}.Static STATIC
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. profiler_files.cmake
  14. INCLUDE_DIRECTORIES
  15. PUBLIC
  16. Include
  17. PRIVATE
  18. Source
  19. BUILD_DEPENDENCIES
  20. PUBLIC
  21. AZ::AzCore
  22. AZ::AzFramework
  23. )
  24. ly_add_target(
  25. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  26. NAMESPACE Gem
  27. FILES_CMAKE
  28. profiler_shared_files.cmake
  29. INCLUDE_DIRECTORIES
  30. PUBLIC
  31. Include
  32. PRIVATE
  33. Source
  34. BUILD_DEPENDENCIES
  35. PRIVATE
  36. Gem::${gem_name}.Static
  37. )
  38. ly_add_source_properties(
  39. SOURCES
  40. Source/ProfilerModule.cpp
  41. PROPERTY COMPILE_DEFINITIONS
  42. VALUES
  43. O3DE_GEM_NAME=${gem_name}
  44. O3DE_GEM_VERSION=${gem_version})
  45. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  46. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name})
  47. # visualization portion
  48. ly_add_target(
  49. NAME ${gem_name}ImGui ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  50. NAMESPACE Gem
  51. FILES_CMAKE
  52. profiler_imgui_shared_files.cmake
  53. INCLUDE_DIRECTORIES
  54. PUBLIC
  55. Include
  56. PRIVATE
  57. Source
  58. BUILD_DEPENDENCIES
  59. PRIVATE
  60. Gem::${gem_name}.Static
  61. Gem::ImGui.imguilib
  62. RUNTIME_DEPENDENCIES
  63. Gem::ImGui.imguilib
  64. )
  65. # Inject the gem name into the Module source file
  66. ly_add_source_properties(
  67. SOURCES
  68. Source/ProfilerImGuiModule.cpp
  69. PROPERTY COMPILE_DEFINITIONS
  70. VALUES
  71. O3DE_GEM_NAME=${gem_name}
  72. O3DE_GEM_VERSION=${gem_version})
  73. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name}ImGui)
  74. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name}ImGui)
  75. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}ImGui)