CMakeLists.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ly_add_target(
  9. NAME ${gem_name}.Static STATIC
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. multiplayercompression_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PRIVATE
  15. Source
  16. BUILD_DEPENDENCIES
  17. PUBLIC
  18. 3rdParty::lz4
  19. AZ::AzNetworking
  20. AZ::AzCore
  21. )
  22. ly_add_target(
  23. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  24. NAMESPACE Gem
  25. FILES_CMAKE
  26. multiplayercompression_shared_files.cmake
  27. INCLUDE_DIRECTORIES
  28. PRIVATE
  29. Source
  30. BUILD_DEPENDENCIES
  31. PRIVATE
  32. Gem::${gem_name}.Static
  33. )
  34. # Inject the gem name into the Module source file
  35. ly_add_source_properties(
  36. SOURCES
  37. Source/MultiplayerCompressionModule.cpp
  38. PROPERTY COMPILE_DEFINITIONS
  39. VALUES
  40. O3DE_GEM_NAME=${gem_name}
  41. O3DE_GEM_VERSION=${gem_version})
  42. # use the ${gem_name} module everywhere except builders:
  43. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  44. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  45. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  46. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  47. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})
  48. endif()
  49. ################################################################################
  50. # Tests
  51. ################################################################################
  52. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  53. ly_add_target(
  54. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  55. NAMESPACE Gem
  56. FILES_CMAKE
  57. multiplayercompression_tests_files.cmake
  58. INCLUDE_DIRECTORIES
  59. PRIVATE
  60. Source
  61. Tests
  62. BUILD_DEPENDENCIES
  63. PRIVATE
  64. AZ::AzTest
  65. Gem::${gem_name}.Static
  66. )
  67. ly_add_googletest(
  68. NAME Gem::${gem_name}.Tests
  69. LABELS REQUIRES_tiaf
  70. )
  71. endif()