CMakeLists.txt 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. Gem::AudioSystem.API
  102. PRIVATE
  103. Gem::LmbrCentral.Static
  104. Gem::Multiplayer.Unified.Static
  105. Gem::PhysX.Static
  106. Gem::DebugDraw.Static
  107. Gem::ImGui.Static
  108. Gem::LyShine.Static
  109. Gem::GameState.Static
  110. AUTOGEN_RULES
  111. *.AutoComponent.xml,AutoComponent_Header.jinja,$path/$fileprefix.AutoComponent.h
  112. *.AutoComponent.xml,AutoComponent_Source.jinja,$path/$fileprefix.AutoComponent.cpp
  113. *.AutoComponent.xml,AutoComponentTypes_Header.jinja,$path/AutoComponentTypes.h
  114. *.AutoComponent.xml,AutoComponentTypes_Source.jinja,$path/AutoComponentTypes.cpp
  115. )
  116. ly_add_target(
  117. NAME MultiplayerSample.Client ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  118. NAMESPACE Gem
  119. FILES_CMAKE
  120. multiplayersample_shared_files.cmake
  121. ../../multiplayersample_asset_files.cmake
  122. INCLUDE_DIRECTORIES
  123. PRIVATE
  124. Source
  125. .
  126. PUBLIC
  127. Include
  128. BUILD_DEPENDENCIES
  129. PRIVATE
  130. Gem::Multiplayer.Client.Static
  131. Gem::MultiplayerSample.Client.Static
  132. Gem::Atom_AtomBridge.Static
  133. )
  134. ly_add_target(
  135. NAME MultiplayerSample.Server ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  136. NAMESPACE Gem
  137. FILES_CMAKE
  138. multiplayersample_shared_files.cmake
  139. ../../multiplayersample_asset_files.cmake
  140. INCLUDE_DIRECTORIES
  141. PRIVATE
  142. Source
  143. .
  144. PUBLIC
  145. Include
  146. BUILD_DEPENDENCIES
  147. PRIVATE
  148. Gem::Multiplayer.Server.Static
  149. Gem::MultiplayerSample.Server.Static
  150. Gem::Atom_AtomBridge.Static
  151. )
  152. ly_add_target(
  153. NAME MultiplayerSample ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  154. NAMESPACE Gem
  155. FILES_CMAKE
  156. multiplayersample_shared_files.cmake
  157. ../../multiplayersample_asset_files.cmake
  158. INCLUDE_DIRECTORIES
  159. PRIVATE
  160. Source
  161. .
  162. PUBLIC
  163. Include
  164. BUILD_DEPENDENCIES
  165. PRIVATE
  166. Gem::Multiplayer.Unified.Static
  167. Gem::MultiplayerSample.Unified.Static
  168. Gem::Atom_AtomBridge.Static
  169. )
  170. # if enabled, MultiplayerSample is used by all kinds of applications
  171. ly_create_alias(NAME MultiplayerSample.Builders NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  172. ly_create_alias(NAME MultiplayerSample.Tools NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  173. ly_create_alias(NAME MultiplayerSample.Clients NAMESPACE Gem TARGETS Gem::MultiplayerSample.Client)
  174. ly_create_alias(NAME MultiplayerSample.Servers NAMESPACE Gem TARGETS Gem::MultiplayerSample.Server)
  175. ly_create_alias(NAME MultiplayerSample.Unified NAMESPACE Gem TARGETS Gem::MultiplayerSample)
  176. ################################################################################
  177. # Gem dependencies
  178. ################################################################################
  179. # Maps the MultiplayerSample Project with the specified list of enabled gems
  180. ly_enable_gems(PROJECT_NAME MultiplayerSample GEM_FILE enabled_gems.cmake)
  181. # If we build a server, then add the project name to the list of server launcher projects
  182. if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
  183. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS MultiplayerSample)
  184. endif()
  185. # If we build a server, then add the project name to the list of server launcher projects
  186. if(PAL_TRAIT_BUILD_UNIFIED_SUPPORTED)
  187. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_UNIFIED_PROJECTS MultiplayerSample)
  188. endif()
  189. set_property(TARGET MultiplayerSample APPEND PROPERTY GAMELAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_client.cfg\"")
  190. set_property(TARGET MultiplayerSample APPEND PROPERTY SERVERLAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_server.cfg\"")
  191. set_property(TARGET MultiplayerSample APPEND PROPERTY UNIFIEDLAUNCHER_ADDITIONAL_VS_DEBUGGER_COMMAND_ARGUMENTS "--console-command-file=\"launch_server.cfg\"")