FindLibXml2 will set the LIBXML2_LIBRARIES variable to the libraries that
we must link against. This will be an empty string if libxml2 is not
found. Avoid hardcoding the library name as xml2 in the configuration.
Simplify the usage in the WindowsManifest library.
else()
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
- set(LIBXML2_LIBS "xml2")
endif()
endif()
endif()
-set(system_libs)
-if( CMAKE_HOST_UNIX )
- if( LLVM_LIBXML2_ENABLED )
- set(system_libs ${system_libs} ${LIBXML2_LIBS})
- endif()
-endif()
-
add_llvm_component_library(LLVMWindowsManifest
WindowsManifestMerger.cpp
${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest
${Backtrace_INCLUDE_DIRS}
- LINK_LIBS ${system_libs}
+ LINK_LIBS ${LIBXML2_LIBRARIES}
)
-set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")
+set_property(TARGET LLVMWindowsManifest PROPERTY
+ LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})