CMakeLists.txt 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. #
  6. #
  7. o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  8. ly_add_target(
  9. NAME MultiplayerSample.Client.Static STATIC
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. multiplayersample_autogen_files.cmake
  13. multiplayersample_files.cmake
  14. multiplayersample_client_files.cmake
  15. ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  16. INCLUDE_DIRECTORIES
  17. PRIVATE
  18. Source
  19. .
  20. PUBLIC
  21. Include
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. Gem::DebugDraw
  25. Gem::LyShine
  26. Gem::StartingPointInput
  27. Gem::EMotionFXStaticLib
  28. Gem::PhysX
  29. Gem::PopcornFX.Static
  30. Gem::Multiplayer.Client
  31. Gem::AudioSystem.API
  32. PRIVATE
  33. Gem::LmbrCentral.Static
  34. Gem::Multiplayer.Client.Static
  35. Gem::PhysX.Static
  36. Gem::DebugDraw.Static
  37. Gem::ImGui.Static
  38. Gem::LyShine.Static
  39. Gem::GameState.Static
  40. AUTOGEN_RULES
  41. *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
  42. *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
  43. *.AutoComponent.xml,AutoComponentTypes_Header.jinja,$path/AutoComponentTypes.h
  44. *.AutoComponent.xml,AutoComponentTypes_Source.jinja,$path/AutoComponentTypes.cpp
  45. )
  46. ly_add_target(
  47. NAME MultiplayerSample.Server.Static STATIC
  48. NAMESPACE Gem
  49. FILES_CMAKE
  50. multiplayersample_autogen_files.cmake
  51. multiplayersample_files.cmake
  52. multiplayersample_server_files.cmake
  53. ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  54. INCLUDE_DIRECTORIES
  55. PRIVATE
  56. Source
  57. .
  58. PUBLIC
  59. Include
  60. BUILD_DEPENDENCIES
  61. PUBLIC
  62. Gem::StartingPointInput
  63. Gem::EMotionFXStaticLib
  64. Gem::PhysX
  65. Gem::Multiplayer.Server
  66. PRIVATE
  67. Gem::LmbrCentral.Static
  68. Gem::Multiplayer.Server.Static
  69. Gem::PhysX.Static
  70. Gem::GameState.Static
  71. AUTOGEN_RULES
  72. *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
  73. *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
  74. *.AutoComponent.xml,AutoComponentTypes_Header.jinja,$path/AutoComponentTypes.h
  75. *.AutoComponent.xml,AutoComponentTypes_Source.jinja,$path/AutoComponentTypes.cpp
  76. )
  77. ly_add_target(
  78. NAME MultiplayerSample.Unified.Static STATIC
  79. NAMESPACE Gem
  80. FILES_CMAKE
  81. multiplayersample_autogen_files.cmake
  82. multiplayersample_files.cmake
  83. multiplayersample_client_files.cmake
  84. multiplayersample_server_files.cmake
  85. ${pal_dir}/multiplayersample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  86. INCLUDE_DIRECTORIES
  87. PRIVATE
  88. Source
  89. .
  90. PUBLIC
  91. Include
  92. BUILD_DEPENDENCIES
  93. PUBLIC
  94. Gem::DebugDraw
  95. Gem::LyShine
  96. Gem::StartingPointInput
  97. Gem::EMotionFXStaticLib
  98. Gem::PhysX
  99. Gem::PopcornFX.Static
  100. Gem::Multiplayer
  101. PRIVATE
  102. Gem::LmbrCentral.Static
  103. Gem::Multiplayer.Unified.Static
  104. Gem::PhysX.Static
  105. Gem::DebugDraw.Static
  106. Gem::ImGui.Static
  107. Gem::LyShine.Static
  108. Gem::GameState.Static
  109. AUTOGEN_RULES
  110. *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
  111. *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
  112. *.AutoComponent.xml,AutoComponentTypes_Header.jinja,$path/AutoComponentTypes.h
  113. *.AutoComponent.xml,AutoComponentTypes_Source.jinja,$path/AutoComponentTypes.cpp
  114. )
  115. ly_add_target(
  116. NAME MultiplayerSample.Client ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  117. NAMESPACE Gem
  118. FILES_CMAKE
  119. multiplayersample_shared_files.cmake
  120. ../../multiplayersample_asset_files.cmake
  121. INCLUDE_DIRECTORIES
  122. PRIVATE
  123. Source
  124. .
  125. PUBLIC
  126. Include
  127. BUILD_DEPENDENCIES
  128. PRIVATE
  129. Gem::Multiplayer.Client.Static
  130. Gem::MultiplayerSample.Client.Static
  131. Gem::Atom_AtomBridge.Static
  132. )
  133. ly_add_target(
  134. NAME MultiplayerSample.Server ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  135. NAMESPACE Gem
  136. FILES_CMAKE
  137. multiplayersample_shared_files.cmake
  138. ../../multiplayersample_asset_files.cmake
  139. INCLUDE_DIRECTORIES
  140. PRIVATE
  141. Source
  142. .
  143. PUBLIC
  144. Include
  145. BUILD_DEPENDENCIES
  146. PRIVATE
  147. Gem::Multiplayer.Server.Static
  148. Gem::MultiplayerSample.Server.Static
  149. Gem::Atom_AtomBridge.Static
  150. )
  151. ly_add_target(
  152. NAME MultiplayerSample ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  153. NAMESPACE Gem
  154. FILES_CMAKE
  155. multiplayersample_shared_files.cmake
  156. ../../multiplayersample_asset_files.cmake
  157. INCLUDE_DIRECTORIES
  158. PRIVATE
  159. Source
  160. .
  161. PUBLIC
  162. Include
  163. BUILD_DEPENDENCIES
  164. PRIVATE
  165. Gem::Multiplayer.Unified.Static
  166. Gem::MultiplayerSample.Unified.Static
  167. Gem::Atom_AtomBridge.Static
  168. )
  169. # if enabled, MultiplayerSample is used by all kinds of applications
  170. ly_create_alias(NAME MultiplayerSample.Builders NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  171. ly_create_alias(NAME MultiplayerSample.Tools NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  172. ly_create_alias(NAME MultiplayerSample.Clients NAMESPACE Gem TARGETS Gem::MultiplayerSample.Client)
  173. ly_create_alias(NAME MultiplayerSample.Servers NAMESPACE Gem TARGETS Gem::MultiplayerSample.Server)
  174. ly_create_alias(NAME MultiplayerSample.Unified NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  175. ################################################################################
  176. # Gem dependencies
  177. ################################################################################
  178. # Maps the MultiplayerSample Project with the specified list of enabled gems
  179. ly_enable_gems(PROJECT_NAME MultiplayerSample GEM_FILE enabled_gems.cmake)
  180. # If we build a server, then add the project name to the list of server launcher projects
  181. if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
  182. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
  183. endif()
  184. # If we build a server, then add the project name to the list of server launcher projects
  185. if(PAL_TRAIT_BUILD_UNIFIED_SUPPORTED)
  186. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_UNIFIED_PROJECTS MultiplayerSample)
  187. endif()
  188. set_property(TARGET MultiplayerSample APPEND PROPERTY GAMELAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_client.cfg\"")
  189. set_property(TARGET MultiplayerSample APPEND PROPERTY SERVERLAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_server.cfg\"")
  190. set_property(TARGET MultiplayerSample APPEND PROPERTY UNIFIEDLAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_server.cfg\"")