summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/WindowsManifest/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/WindowsManifest/CMakeLists.txt b/llvm/lib/WindowsManifest/CMakeLists.txt
index fe6ddcd414d..8cfea1282ad 100644
--- a/llvm/lib/WindowsManifest/CMakeLists.txt
+++ b/llvm/lib/WindowsManifest/CMakeLists.txt
@@ -7,6 +7,15 @@ add_llvm_component_library(LLVMWindowsManifest
if(LIBXML2_LIBRARIES)
target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES})
+
+ get_filename_component(xml2_library ${LIBXML2_LIBRARIES} NAME)
+ if(xml2_library MATCHES "^${CMAKE_STATIC_LIBRARY_PREFIX}.*${CMAKE_STATIC_LIBRARY_SUFFIX}$")
+ string(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" xml2_library ${xml2_library})
+ string(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library})
+ elseif(xml2_library MATCHES "^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$")
+ string(REGEX REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "" xml2_library ${xml2_library})
+ string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library})
+ endif()
set_property(TARGET LLVMWindowsManifest PROPERTY
- LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})
+ LLVM_SYSTEM_LIBS ${xml2_library})
endif()
OpenPOWER on IntegriCloud