CMakeLists.txt 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. ly_add_target(
  10. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. automatedtesting_files.cmake
  14. ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  15. automatedtesting_autogen_files.cmake
  16. INCLUDE_DIRECTORIES
  17. PRIVATE
  18. Source
  19. .
  20. PUBLIC
  21. Include
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. AZ::AzNetworking
  25. Gem::Multiplayer.Unified
  26. PRIVATE
  27. AZ::AzCore
  28. Gem::Atom_AtomBridge.Static
  29. Gem::Multiplayer.Unified.Static
  30. AUTOGEN_RULES
  31. *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
  32. *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
  33. *.AutoComponent.xml,AutoComponentTypes_Header.jinja,$path/AutoComponentTypes.h
  34. *.AutoComponent.xml,AutoComponentTypes_Source.jinja,$path/AutoComponentTypes.cpp
  35. )
  36. # Inject the gem name into the Module source file
  37. ly_add_source_properties(
  38. SOURCES
  39. Source/AutomatedTestingModule.cpp
  40. PROPERTY COMPILE_DEFINITIONS
  41. VALUES
  42. O3DE_GEM_NAME=${gem_name}
  43. O3DE_GEM_VERSION=${gem_version})
  44. # if enabled, AutomatedTesting is used by all kinds of applications
  45. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name})
  46. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})
  47. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  48. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  49. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  50. # Add project to the list server projects to create the ${gem_name}.ServerLauncher
  51. if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
  52. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS AutomatedTesting)
  53. endif()
  54. # Add project to the list server projects to create the AutomatedTesting.UnifiedLauncher
  55. if(PAL_TRAIT_BUILD_UNIFIED_SUPPORTED)
  56. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_UNIFIED_PROJECTS AutomatedTesting)
  57. endif()