[cfe-commits] r83773 - /cfe/trunk/CMakeLists.txt

Benjamin Kramer benny.kra at googlemail.com
Sun Oct 11 05:22:00 PDT 2009


Author: d0k
Date: Sun Oct 11 07:22:00 2009
New Revision: 83773

URL: http://llvm.org/viewvc/llvm-project?rev=83773&view=rev
Log:
CMake mingw build fixes.

- llvm's libs must be linked after clang's
- libLLVMSystem depends on psapi on win32 (get_system_libs has it)
- CIndex builds successfully on mingw now

Modified:
    cfe/trunk/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=83773&r1=83772&r2=83773&view=diff

==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Sun Oct 11 07:22:00 2009
@@ -43,14 +43,18 @@
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )
-  if( LLVM_LINK_COMPONENTS )
-    llvm_config(${name} ${LLVM_LINK_COMPONENTS})
-  endif( LLVM_LINK_COMPONENTS )
   if( LLVM_USED_LIBS )
     foreach(lib ${LLVM_USED_LIBS})
       target_link_libraries( ${name} ${lib} )
     endforeach(lib)
   endif( LLVM_USED_LIBS )
+  if( LLVM_LINK_COMPONENTS )
+    llvm_config(${name} ${LLVM_LINK_COMPONENTS})
+  endif( LLVM_LINK_COMPONENTS )
+  get_system_libs(llvm_system_libs)
+  if( llvm_system_libs )
+    target_link_libraries(${name} ${llvm_system_libs})
+  endif( llvm_system_libs )
   add_dependencies(${name} ClangDiagnosticCommon)
   if(MSVC)
     get_target_property(cflag ${name} COMPILE_FLAGS)





More information about the cfe-commits mailing list