2018-03-12 14:41:51 +08:00
|
|
|
_find_package(${ARGS})
|
2018-04-04 06:59:54 +08:00
|
|
|
if(LibXml2_FOUND)
|
2018-03-12 14:41:51 +08:00
|
|
|
find_package(LibLZMA)
|
2019-03-16 06:29:08 +08:00
|
|
|
find_package(ZLIB)
|
2020-05-19 01:40:18 +08:00
|
|
|
include(SelectLibraryConfigurations)
|
2020-07-03 02:00:28 +08:00
|
|
|
find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
|
|
|
|
find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
2020-05-19 01:40:18 +08:00
|
|
|
find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib)
|
2020-07-03 02:00:28 +08:00
|
|
|
find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
|
|
|
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
2020-05-19 01:40:18 +08:00
|
|
|
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib)
|
|
|
|
select_library_configurations(ICONV)
|
|
|
|
select_library_configurations(CHARSET)
|
2019-03-16 06:29:08 +08:00
|
|
|
list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES})
|
2020-05-19 01:40:18 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
list(APPEND LIBXML2_LIBRARIES m)
|
|
|
|
else()
|
|
|
|
list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES})
|
2020-01-16 02:33:50 +08:00
|
|
|
if(TARGET LibXml2::LibXml2)
|
2020-05-19 01:40:18 +08:00
|
|
|
target_link_libraries(LibXml2::LibXml2 INTERFACE ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES})
|
2020-01-16 02:33:50 +08:00
|
|
|
endif()
|
2020-05-19 01:40:18 +08:00
|
|
|
endif()
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
|
|
list(APPEND LIBXML2_LIBRARIES ws2_32)
|
2018-04-04 06:59:54 +08:00
|
|
|
endif()
|
2018-03-12 14:41:51 +08:00
|
|
|
endif()
|