CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # {BEGIN_LICENSE}
  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. # {END_LICENSE}
  8. # Setup the gem meta variables that includes the "gem_path", "gem_name" and "gem_version"
  9. # The "pal_dir" variable is also set which refers to the Platform/<platform-name> directory
  10. # based on the directory of this CMakeLists.txt
  11. o3de_gem_setup("${Name}")
  12. ly_add_target(
  13. NAME ${Name}.Object OBJECT
  14. NAMESPACE ScriptCanvasNodes
  15. FILES_CMAKE
  16. ${Name}_files.cmake
  17. INCLUDE_DIRECTORIES
  18. PRIVATE
  19. Source
  20. PUBLIC
  21. Include
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. AZ::AzCore
  25. AZ::AzFramework
  26. Gem::ScriptCanvas.Shared
  27. Gem::ScriptCanvas.Extensions
  28. AUTOGEN_RULES
  29. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h
  30. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp
  31. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Header.jinja,$path/$fileprefix_Nodeables.generated.h
  32. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Source.jinja,$path/$fileprefix_Nodeables.generated.cpp
  33. )
  34. set (dependent_targets ${gem_name}.Private.Object;${gem_name};${gem_name}.Editor)
  35. foreach (dependent_target IN LISTS dependent_targets)
  36. if (TARGET ${dependent_target})
  37. target_link_libraries(${dependent_target} PRIVATE ScriptCanvasNodes::${Name}.Object)
  38. else()
  39. message(FATAL_ERROR "The target ${dependent_target} was not found, if the gem was not created using scripts/o3de create-gem"
  40. " you may update dependent_targets to match the corresponding targets in your gem")
  41. endif()
  42. endforeach()