This reverts commit492de35df4. I tried to apply John's changes in8d897ec915that were expected to fix his patch but that didn't work unfortunately. Reverting this again to fix the macOS bots and leave him more time to investigate the issue.
21 lines
651 B
CMake
21 lines
651 B
CMake
# We need to execute this script at installation time because the
|
|
# DESTDIR environment variable may be unset at configuration time.
|
|
# See PR8397.
|
|
|
|
function(install_symlink name target outdir)
|
|
set(DESTDIR $ENV{DESTDIR})
|
|
set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
|
|
|
|
message(STATUS "Creating ${name}")
|
|
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"
|
|
WORKING_DIRECTORY "${bindir}" ERROR_VARIABLE has_err)
|
|
if(CMAKE_HOST_WIN32 AND has_err)
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${target}" "${name}"
|
|
WORKING_DIRECTORY "${bindir}")
|
|
endif()
|
|
|
|
endfunction()
|