1# Building shared libraries requires PIC objects. 2if(LLVM_ENABLE_PIC) 3 4 set(LLVM_LINK_COMPONENTS 5 Remarks 6 ) 7 8 set(SOURCES 9 libremarks.cpp 10 ) 11 12 set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Remarks.exports) 13 14 add_llvm_library(Remarks SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES}) 15 16 if (LLVM_INTEGRATED_CRT_ALLOC AND MSVC) 17 # Make sure we search LLVMSupport first, before the CRT libs 18 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -INCLUDE:malloc") 19 endif() 20 21 install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h 22 DESTINATION include/llvm-c 23 COMPONENT Remarks) 24 25 if (APPLE) 26 set(REMARKS_VERSION ${LLVM_VERSION_MAJOR}) 27 set_property(TARGET Remarks APPEND_STRING PROPERTY 28 LINK_FLAGS 29 " -compatibility_version 1 -current_version ${REMARKS_VERSION}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}") 30 endif() 31 32endif() 33