##add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
#endif()
- if (CMAKE_VERSION VERSION_LESS 2.8.12 OR NOT "${libkind}" STREQUAL "STATIC")
+ if (CMAKE_VERSION VERSION_LESS 2.8.12)
set(cmake_2_8_12_INTERFACE)
set(cmake_2_8_12_PRIVATE)
set(cmake_2_8_12_PUBLIC)
set(cmake_2_8_12_PUBLIC PUBLIC)
endif ()
+ if ("${libkind}" STREQUAL "STATIC")
+ set(lldb_library_keyword ${cmake_2_8_12_INTERFACE})
+ else ()
+ set(lldb_library_keyword ${cmake_2_8_12_PUBLIC})
+ endif ()
+
if(LLDB_USED_LIBS)
# The Darwin linker doesn't understand --start-group/--end-group.
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
- target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
+ target_link_libraries(${name} ${lldb_library_keyword}
-Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
else()
- target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${LLDB_USED_LIBS})
+ target_link_libraries(${name} ${lldb_library_keyword} ${LLDB_USED_LIBS})
endif()
endif()
- target_link_libraries(${name} ${cmake_2_8_12_PUBLIC} ${CLANG_USED_LIBS})
- target_link_libraries(${name} ${LLVM_USED_LIBS})
+ target_link_libraries(${name} ${lldb_library_keyword} ${CLANG_USED_LIBS})
+ target_link_libraries(${name} ${lldb_library_keyword} ${LLVM_USED_LIBS})
llvm_config(${name} ${LLVM_LINK_COMPONENTS})
- target_link_libraries(${name} ${LLVM_COMMON_LIBS})
+ target_link_libraries(${name} ${lldb_library_keyword} ${LLVM_COMMON_LIBS})
if (LLVM_COMMON_DEPENDS)
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
endif()