[PATCH] D45106: [Build] Use LIBXML2_LIBRARIES from find_package

Andrew Kelley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 13:28:58 PDT 2018


andrewrk created this revision.
andrewrk added reviewers: ecbeckmann, labath.
Herald added subscribers: llvm-commits, hiraditya, mgorny.

Previously we pass the string "xml2" to the link libraries of the WindowsManifest library. This prevents static linking against libxml2.

This patch fixes the build to follow the cmake convention of using the output of find_package as the LINK_LIBS argument.


Repository:
  rL LLVM

https://reviews.llvm.org/D45106

Files:
  llvm/cmake/config-ix.cmake
  llvm/lib/WindowsManifest/CMakeLists.txt


Index: llvm/lib/WindowsManifest/CMakeLists.txt
===================================================================
--- llvm/lib/WindowsManifest/CMakeLists.txt
+++ llvm/lib/WindowsManifest/CMakeLists.txt
@@ -1,7 +1,7 @@
 set(system_libs)
 if( CMAKE_HOST_UNIX )
   if( LLVM_LIBXML2_ENABLED )
-    set(system_libs ${system_libs} ${LIBXML2_LIBS})
+    set(system_libs ${system_libs} ${LIBXML2_LIBRARIES})
   endif()
 endif()
 
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -174,7 +174,6 @@
       if (LIBXML2_FOUND)
         set(LLVM_LIBXML2_ENABLED 1)
         include_directories(${LIBXML2_INCLUDE_DIR})
-        set(LIBXML2_LIBS "xml2")
       endif()
     endif()
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45106.140478.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180330/33fcf0a9/attachment.bin>


More information about the llvm-commits mailing list