CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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}")
  9. include(${pal_dir}/atomsampleviewer_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
  10. if (NOT LY_MONOLITHIC_GAME)
  11. if (ATOMSAMPLEVIEWER_TRAIT_BUILD_SUPPORTS_STANDALONE)
  12. ly_add_target(
  13. NAME AtomSampleViewerStandalone EXECUTABLE
  14. NAMESPACE AZ
  15. FILES_CMAKE
  16. atomsample_viewer_files.cmake
  17. ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  18. INCLUDE_DIRECTORIES
  19. PUBLIC
  20. .
  21. Platform/Common
  22. PRIVATE
  23. ${pal_dir}
  24. BUILD_DEPENDENCIES
  25. PRIVATE
  26. AZ::AtomCore
  27. AZ::AzCore
  28. AZ::AzGameFramework
  29. Gem::Atom_RPI.Public
  30. Gem::AtomSampleViewer.Private.Static
  31. RUNTIME_DEPENDENCIES
  32. AZ::AssetProcessor
  33. )
  34. add_subdirectory(PythonTests)
  35. ly_set_gem_variant_to_load(TARGETS AtomSampleViewerStandalone VARIANTS Clients)
  36. # Adds the AtomSampleViewerStandalone target as a C preprocessor define so that it can be used as a Settings Registry
  37. # specialization in order to look up the generated .setreg which contains the dependencies
  38. # specified for the target.
  39. if(TARGET AtomSampleViewerStandalone)
  40. set_source_files_properties(
  41. Platform/Common/AtomSampleViewerApplication.cpp
  42. PROPERTIES
  43. COMPILE_DEFINITIONS
  44. LY_CMAKE_TARGET="AtomSampleViewerStandalone"
  45. )
  46. else()
  47. message(FATAL_ERROR "Cannot set LY_CMAKE_TARGET define to AtomSampleViewerStandalone as the target doesn't exist anymore."
  48. " Perhaps it has been renamed")
  49. endif()
  50. endif()
  51. endif()