mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 03:44:59 +00:00
[CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE) gave up.
llvm-svn: 201319
This commit is contained in:
parent
e72e2e9088
commit
8e57597830
@ -311,13 +311,18 @@ macro(add_clang_library name)
|
||||
endif()
|
||||
llvm_add_library(${name} ${ARG_UNPARSED_ARGUMENTS} ${srcs})
|
||||
|
||||
target_link_libraries( ${name} ${LLVM_COMMON_LIBS} )
|
||||
if(TARGET ${name})
|
||||
target_link_libraries( ${name} ${LLVM_COMMON_LIBS} )
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
|
||||
install(TARGETS ${name}
|
||||
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
RUNTIME DESTINATION bin)
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang")
|
||||
install(TARGETS ${name}
|
||||
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
|
||||
RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
else()
|
||||
# Add empty "phony" target
|
||||
add_custom_target(${name})
|
||||
endif()
|
||||
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
|
||||
|
Loading…
Reference in New Issue
Block a user