RPathChange.cmake 699 B

1234567891011121314151617181920212223
  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. if(NOT ${CMAKE_ARGC} EQUAL 6)
  9. message(FATAL_ERROR "RPathChange script called with the wrong number of arguments")
  10. endif()
  11. find_program(LY_INSTALL_NAME_TOOL install_name_tool)
  12. if (NOT LY_INSTALL_NAME_TOOL)
  13. message(FATAL_ERROR "Unable to locate 'install_name_tool'")
  14. endif()
  15. execute_process(COMMAND
  16. ${LY_INSTALL_NAME_TOOL} -rpath ${CMAKE_ARGV4} ${CMAKE_ARGV5} ${CMAKE_ARGV3}
  17. OUTPUT_QUIET # in case we already run it
  18. ERROR_QUIET # in case we already run it
  19. )