CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. assetvalidation_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PRIVATE
  15. Source
  16. PUBLIC
  17. Include
  18. BUILD_DEPENDENCIES
  19. PUBLIC
  20. AZ::AzCore
  21. AZ::AzFramework
  22. Legacy::CryCommon
  23. )
  24. ly_add_target(
  25. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  26. NAMESPACE Gem
  27. FILES_CMAKE
  28. assetvalidation_shared_files.cmake
  29. INCLUDE_DIRECTORIES
  30. PRIVATE
  31. Source
  32. PUBLIC
  33. Include
  34. BUILD_DEPENDENCIES
  35. PRIVATE
  36. Gem::${gem_name}.Static
  37. )
  38. # Inject the gem name into the Module source file
  39. ly_add_source_properties(
  40. SOURCES
  41. Source/AssetValidationModule.cpp
  42. PROPERTY COMPILE_DEFINITIONS
  43. VALUES
  44. O3DE_GEM_NAME=${gem_name}
  45. O3DE_GEM_VERSION=${gem_version})
  46. ################################################################################
  47. # Tests
  48. ################################################################################
  49. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
  50. ly_add_target(
  51. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  52. NAMESPACE Gem
  53. FILES_CMAKE
  54. assetvalidation_tests_files.cmake
  55. INCLUDE_DIRECTORIES
  56. PRIVATE
  57. Tests
  58. Source
  59. BUILD_DEPENDENCIES
  60. PRIVATE
  61. AZ::AzTest
  62. Gem::${gem_name}.Static
  63. AZ::AzFramework
  64. AZ::AzFrameworkTestShared
  65. )
  66. ly_add_googletest(
  67. NAME Gem::${gem_name}.Tests
  68. LABELS REQUIRES_tiaf
  69. )
  70. endif()
  71. # AssetValidation should be active in all clients plus tools
  72. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  73. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})