From 470fb519615d6c2bf31e9b3c0dd068bb0af39af2 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Thu, 19 Nov 2009 23:21:43 +0000 Subject: [PATCH] Use CMAKE_DL_LIBS instead of raw library name. Fixes bug 5536. Patch by Tobias Grosser! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89406 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/LLVMConfig.cmake | 2 +- lib/System/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index d1c297c1586..a7536748a37 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -5,7 +5,7 @@ function(get_system_libs return_var) set(system_libs ${system_libs} imagehlp psapi) elseif( CMAKE_HOST_UNIX ) if( HAVE_LIBDL ) - set(system_libs ${system_libs} dl) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) endif() if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) set(system_libs ${system_libs} pthread) diff --git a/lib/System/CMakeLists.txt b/lib/System/CMakeLists.txt index 2945e33d5b1..a56a1f78bb7 100644 --- a/lib/System/CMakeLists.txt +++ b/lib/System/CMakeLists.txt @@ -42,5 +42,5 @@ add_llvm_library(LLVMSystem ) if( BUILD_SHARED_LIBS AND NOT WIN32 ) - target_link_libraries(LLVMSystem dl) + target_link_libraries(LLVMSystem ${CMAKE_DL_LIBS}) endif() -- 2.34.1