From 1a53cbfb4a532511633ad752fcf7396a79857e98 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Wed, 27 May 2009 15:49:33 +0000 Subject: CMake: Set LIBS on llvm-config so we can query the system libraries used by CMake with --ldflags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'cmake/modules/AddLLVM.cmake') diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 1f0ff74c12..c531298a30 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -30,17 +30,11 @@ macro(add_llvm_executable name) target_link_libraries(${name} ${llvm_libs}) else( MSVC ) add_dependencies(${name} llvm-config.target) - if( MINGW ) - target_link_libraries(${name} imagehlp psapi) - elseif( CMAKE_HOST_UNIX ) - if( HAVE_LIBDL ) - target_link_libraries(${name} dl) - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - target_link_libraries(${name} pthread) - endif() - endif( MINGW ) endif( MSVC ) + get_system_libs(llvm_system_libs) + if( llvm_system_libs ) + target_link_libraries(${name} ${llvm_system_libs}) + endif() endmacro(add_llvm_executable name) -- cgit v1.2.3