2013-12-10 11:13:32 +00:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2014-07-03 19:40:08 +00:00
|
|
|
${LLVM_TARGETS_TO_BUILD}
|
2014-07-14 05:01:53 +00:00
|
|
|
Core
|
2013-12-10 11:13:32 +00:00
|
|
|
Object
|
|
|
|
Support
|
|
|
|
)
|
2008-09-22 01:08:49 +00:00
|
|
|
|
|
|
|
add_llvm_tool(llvm-ar
|
|
|
|
llvm-ar.cpp
|
|
|
|
)
|
|
|
|
|
2013-08-28 16:22:16 +00:00
|
|
|
if(UNIX)
|
|
|
|
set(LLVM_LINK_OR_COPY create_symlink)
|
2014-12-04 00:23:58 +00:00
|
|
|
set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-08-28 16:22:16 +00:00
|
|
|
else()
|
|
|
|
set(LLVM_LINK_OR_COPY copy)
|
2014-12-04 00:23:58 +00:00
|
|
|
set(llvm_ar_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-08-28 16:22:16 +00:00
|
|
|
endif()
|
|
|
|
|
2013-12-16 16:03:08 +00:00
|
|
|
set(llvm_ranlib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
|
2013-08-28 16:22:16 +00:00
|
|
|
|
2014-12-03 23:17:24 +00:00
|
|
|
add_custom_command(OUTPUT ${llvm_ranlib}
|
2014-12-04 00:00:36 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}"
|
|
|
|
DEPENDS llvm-ar)
|
2013-08-28 16:22:16 +00:00
|
|
|
|
2014-12-04 01:34:11 +00:00
|
|
|
add_custom_target(llvm-ranlib ALL DEPENDS ${llvm_ranlib})
|
2015-01-07 14:19:15 +00:00
|
|
|
set_target_properties(llvm-ranlib PROPERTIES FOLDER Tools)
|
|
|
|
|
2014-12-08 13:43:38 +00:00
|
|
|
install(SCRIPT install_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
|