# Returns in `return_var' a list of system libraries used by LLVM.
if( NOT MSVC )
if( MINGW )
- set(system_libs ${system_libs} imagehlp psapi)
+ set(system_libs ${system_libs} imagehlp psapi shell32)
elseif( CMAKE_HOST_UNIX )
+ if( HAVE_LIBRT )
+ set(system_libs ${system_libs} rt)
+ endif()
if( HAVE_LIBDL )
- set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
+ set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
+ endif()
+ if(LLVM_ENABLE_TERMINFO)
+ if(HAVE_TERMINFO)
+ set(system_libs ${system_libs} ${TERMINFO_LIBS})
+ endif()
endif()
if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
- set(system_libs ${system_libs} pthread)
+ set(system_libs ${system_libs} pthread)
+ endif()
+ if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
+ set(system_libs ${system_libs} z)
endif()
endif( MINGW )
endif( NOT MSVC )
string(TOUPPER "${c}" capitalized)
list(FIND capitalized_libs LLVM${capitalized} lib_idx)
if( lib_idx LESS 0 )
- # The component is unknown. Maybe is an omitted target?
- is_llvm_target_library(${c} iltl_result)
- if( NOT iltl_result )
- message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.")
- endif()
+ # The component is unknown. Maybe is an omitted target?
+ is_llvm_target_library(${c} iltl_result)
+ if( NOT iltl_result )
+ message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.")
+ endif()
else( lib_idx LESS 0 )
- list(GET llvm_libs ${lib_idx} canonical_lib)
- list(APPEND expanded_components ${canonical_lib})
+ list(GET llvm_libs ${lib_idx} canonical_lib)
+ list(APPEND expanded_components ${canonical_lib})
endif( lib_idx LESS 0 )
endif( NOT idx LESS 0 )
endforeach(c)
set(processed)
while( cursor LESS lst_size )
list(GET expanded_components ${cursor} lib)
- list(APPEND expanded_components ${LLVM_LIB_DEPS_${lib}})
+ get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib})
+ list(APPEND expanded_components ${lib_deps})
# Remove duplicates at the front:
list(REVERSE expanded_components)
list(REMOVE_DUPLICATES expanded_components)