mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 16:29:20 +00:00
Introduce install_symlink.cmake from clang/tools/driver/clang_symlink.cmake. FIXME: Would it be generalized? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223655 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
783 B
CMake
28 lines
783 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
Core
|
|
Object
|
|
Support
|
|
)
|
|
|
|
add_llvm_tool(llvm-ar
|
|
llvm-ar.cpp
|
|
)
|
|
|
|
if(UNIX)
|
|
set(LLVM_LINK_OR_COPY create_symlink)
|
|
set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
|
else()
|
|
set(LLVM_LINK_OR_COPY copy)
|
|
set(llvm_ar_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
|
endif()
|
|
|
|
set(llvm_ranlib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
|
|
|
|
add_custom_command(OUTPUT ${llvm_ranlib}
|
|
COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}"
|
|
DEPENDS llvm-ar)
|
|
|
|
add_custom_target(llvm-ranlib ALL DEPENDS ${llvm_ranlib})
|
|
install(SCRIPT install_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
|