FindDirectXShaderCompilerDxc.cmake.Windows 908 B

123456789101112131415161718192021222324252627
  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. set(MY_NAME "DirectXShaderCompilerDxc")
  9. set(TARGET_WITH_NAMESPACE "3rdParty::$${MY_NAME}")
  10. if (TARGET $${TARGET_WITH_NAMESPACE})
  11. return()
  12. endif()
  13. set(output_subfolder "Builders/DirectXShaderCompiler")
  14. set($${MY_NAME}_BINARY_DIR $${CMAKE_CURRENT_LIST_DIR}/$${MY_NAME}/bin)
  15. add_library($${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
  16. set($${MY_NAME}_RUNTIME_DEPENDENCIES
  17. $${$${MY_NAME}_BINARY_DIR}/Release/dxc.exe
  18. $${$${MY_NAME}_BINARY_DIR}/Release/dxil.dll
  19. $${$${MY_NAME}_BINARY_DIR}/Release/dxcompiler.dll)
  20. ly_add_target_files(TARGETS $${TARGET_WITH_NAMESPACE} OUTPUT_SUBDIRECTORY $${output_subfolder} FILES $${$${MY_NAME}_RUNTIME_DEPENDENCIES})
  21. set($${MY_NAME}_FOUND True)