CMakeLists.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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}.Headers HEADERONLY
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. imageprocessingatom_headers_files.cmake
  13. INCLUDE_DIRECTORIES
  14. INTERFACE
  15. Include
  16. )
  17. if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
  18. return()
  19. endif()
  20. set(platform_tools_files)
  21. set(pal_tools_include_files)
  22. set(pal_tools_include_dirs)
  23. foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED})
  24. string(TOLOWER ${enabled_platform} enabled_platform_lowercase)
  25. o3de_pal_dir(pal_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  26. list(APPEND pal_tools_include_dirs ${pal_tools_source_dir})
  27. list(APPEND platform_tools_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}.cmake)
  28. list(APPEND pal_tools_include_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}_files.cmake)
  29. endforeach()
  30. o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  31. set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
  32. ly_add_target(
  33. NAME ${gem_name}.Editor.Static STATIC
  34. NAMESPACE Gem
  35. AUTOMOC
  36. AUTOUIC
  37. AUTORCC
  38. FILES_CMAKE
  39. imageprocessing_files.cmake
  40. ${pal_tools_include_files}
  41. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  42. PLATFORM_INCLUDE_FILES
  43. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  44. ${common_source_dir}/${PAL_TRAIT_COMPILER_ID}/imageprocessingatom_editor_static_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
  45. ${platform_tools_files}
  46. INCLUDE_DIRECTORIES
  47. PUBLIC
  48. Include
  49. ${pal_source_dir}
  50. ${pal_tools_include_dirs}
  51. .
  52. Source
  53. ../External/CubeMapGen
  54. BUILD_DEPENDENCIES
  55. PUBLIC
  56. 3rdParty::Qt::Core
  57. 3rdParty::Qt::Widgets
  58. 3rdParty::Qt::Gui
  59. 3rdParty::astc-encoder
  60. 3rdParty::squish-ccr
  61. 3rdParty::TIFF
  62. 3rdParty::ISPCTexComp
  63. 3rdParty::OpenEXR
  64. AZ::AzFramework
  65. AZ::AzToolsFramework
  66. AZ::AzQtComponents
  67. AZ::AssetBuilderSDK
  68. AZ::AtomCore
  69. Gem::Atom_RPI.Public
  70. Gem::Atom_RHI.Reflect
  71. Gem::Atom_Utils.Static
  72. )
  73. ly_add_source_properties(
  74. SOURCES
  75. Source/Processing/ImageConvert.cpp
  76. Source/BuilderSettings/BuilderSettingManager.cpp
  77. PROPERTY COMPILE_DEFINITIONS
  78. VALUES ${LY_PAL_TOOLS_DEFINES}
  79. )
  80. ly_add_target(
  81. NAME ${gem_name}.Editor GEM_MODULE
  82. NAMESPACE Gem
  83. FILES_CMAKE
  84. imageprocessingatom_shared_files.cmake
  85. INCLUDE_DIRECTORIES
  86. PRIVATE
  87. Source
  88. PUBLIC
  89. Include
  90. BUILD_DEPENDENCIES
  91. PRIVATE
  92. Gem::${gem_name}.Editor.Static
  93. )
  94. # Inject the gem name into the Module source file
  95. ly_add_source_properties(
  96. SOURCES
  97. Source/ImageProcessingModule.cpp
  98. PROPERTY COMPILE_DEFINITIONS
  99. VALUES
  100. O3DE_GEM_NAME=${gem_name}
  101. O3DE_GEM_VERSION=${gem_version})
  102. ################################################################################
  103. # Tests
  104. ################################################################################
  105. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  106. ly_add_target(
  107. NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  108. NAMESPACE Gem
  109. FILES_CMAKE
  110. imageprocessing_tests_files.cmake
  111. INCLUDE_DIRECTORIES
  112. PRIVATE
  113. Tests
  114. BUILD_DEPENDENCIES
  115. PRIVATE
  116. AZ::AzTest
  117. Gem::${gem_name}.Editor.Static
  118. )
  119. ly_add_googletest(
  120. NAME Gem::${gem_name}.Editor.Tests
  121. LABELS REQUIRES_tiaf
  122. )
  123. endif()