llvm-project/clang/tools/clang-shlib/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
698 B
CMake
Raw Normal View History

# Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off
if (NOT LLVM_ENABLE_PIC)
return()
endif()
get_property(clang_libs GLOBAL PROPERTY CLANG_STATIC_LIBS)
foreach (lib ${clang_libs})
list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>)
list(APPEND _DEPS $<TARGET_PROPERTY:${lib},INTERFACE_LINK_LIBRARIES>)
list(APPEND _DEPS $<TARGET_PROPERTY:${lib},LINK_LIBRARIES>)
endforeach ()
if (CLANG_LINK_CLANG_DYLIB)
set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN)
endif()
add_clang_library(clang-cpp
SHARED
${INSTALL_WITH_TOOLCHAIN}
clang-shlib.cpp
${_OBJECTS}
LINK_LIBS
${_DEPS})