Windows: Add support for unicode command lines
[oota-llvm.git] / cmake / modules / LLVM-Config.cmake
index 163401c857c54b9258379097089085915906de6d..e26fabd1c6f7f34f822f9bf374413bf07c76e9fb 100644 (file)
@@ -2,7 +2,7 @@ function(get_system_libs return_var)
   # 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)
@@ -10,9 +10,17 @@ function(get_system_libs return_var)
       if( HAVE_LIBDL )
         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)
       endif()
+      if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
+        set(system_libs ${system_libs} z)
+      endif()
     endif( MINGW )
   endif( NOT MSVC )
   set(${return_var} ${system_libs} PARENT_SCOPE)