mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
419008c6d4
Setting DESTDIR was erroneously buried under a condition here - if it's set it should always be used. llvm-svn: 369011
22 lines
569 B
CMake
22 lines
569 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})
|
|
if(CMAKE_HOST_UNIX)
|
|
set(LINK_OR_COPY create_symlink)
|
|
else()
|
|
set(LINK_OR_COPY copy)
|
|
endif()
|
|
|
|
set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
|
|
|
|
message(STATUS "Creating ${name}")
|
|
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "${target}" "${name}"
|
|
WORKING_DIRECTORY "${bindir}")
|
|
|
|
endfunction()
|