forked from OSchip/llvm-project
CMake: Fix DESTDIR-related installation problem on Windows, from the
mysterious Elrood on IRC. llvm-svn: 102435
This commit is contained in:
parent
da7be08a0c
commit
a9f7c3263e
|
@ -30,6 +30,7 @@ add_clang_executable(clang
|
|||
|
||||
if(UNIX)
|
||||
set(CLANGXX_LINK_OR_COPY create_symlink)
|
||||
set(CLANGXX_DESTDIR $ENV{DESTDIR}/)
|
||||
else()
|
||||
set(CLANGXX_LINK_OR_COPY copy)
|
||||
endif()
|
||||
|
@ -45,4 +46,4 @@ install(TARGETS clang
|
|||
RUNTIME DESTINATION bin)
|
||||
|
||||
# Create the clang++ symlink at installation time.
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${CLANGXX_LINK_OR_COPY} \"${CMAKE_INSTALL_PREFIX}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}\" \"\$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}\")")
|
||||
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${CLANGXX_LINK_OR_COPY} \"${CMAKE_INSTALL_PREFIX}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}\" \"${CLANGXX_DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}\")")
|
||||
|
|
Loading…
Reference in New Issue