Index: llvm/lib/Support/CMakeLists.txt =================================================================== --- llvm/lib/Support/CMakeLists.txt +++ llvm/lib/Support/CMakeLists.txt @@ -277,16 +277,8 @@ # This block is only needed for llvm-config. When we deprecate llvm-config and # move to using CMake export, this block can be removed. if(LLVM_ENABLE_ZLIB) - # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. - if(CMAKE_BUILD_TYPE) - string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) - get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION_${build_type}) - endif() - if(NOT zlib_library) - get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION) - endif() - get_library_name(${zlib_library} zlib_library) - set(llvm_system_libs ${llvm_system_libs} "${zlib_library}") + get_library_name(${ZLIB_LIBRARY} zlib_library_name) + set(llvm_system_libs ${llvm_system_libs} "${zlib_library_name}") endif() if(LLVM_ENABLE_TERMINFO) Index: llvm/lib/WindowsManifest/CMakeLists.txt =================================================================== --- llvm/lib/WindowsManifest/CMakeLists.txt +++ llvm/lib/WindowsManifest/CMakeLists.txt @@ -1,7 +1,7 @@ include(GetLibraryName) if(LLVM_ENABLE_LIBXML2) - set(imported_libs LibXml2::LibXml2) + set(imported_libs "${LIBXML2_LIBRARIES}") endif() add_llvm_component_library(LLVMWindowsManifest @@ -21,14 +21,6 @@ # This block is only needed for llvm-config. When we deprecate llvm-config and # move to using CMake export, this block can be removed. if(LLVM_ENABLE_LIBXML2) - # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators. - if(CMAKE_BUILD_TYPE) - string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) - get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION_${build_type}) - endif() - if(NOT libxml2_library) - get_property(libxml2_library TARGET LibXml2::LibXml2 PROPERTY LOCATION) - endif() - get_library_name(${libxml2_library} libxml2_library) - set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${libxml2_library}) + get_library_name(${LIBXML2_LIBRARY} libxml2_library_name) + set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS ${libxml2_library_name}) endif()