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)
|
|
|
|
|
|
|
|
list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES})
|
|
|
|
|
2018-04-04 06:59:54 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
list(APPEND LIBXML2_LIBRARIES
|
|
|
|
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
|
|
|
|
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib
|
|
|
|
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
|
|
|
|
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib
|
|
|
|
ws2_32)
|
2020-01-16 02:33:50 +08:00
|
|
|
if(TARGET LibXml2::LibXml2)
|
|
|
|
target_link_libraries(LibXml2::LibXml2 INTERFACE
|
|
|
|
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
|
|
|
|
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib
|
|
|
|
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
|
|
|
|
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib)
|
|
|
|
endif()
|
2019-03-16 06:29:08 +08:00
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
list(APPEND LIBXML2_LIBRARIES m)
|
2018-04-04 06:59:54 +08:00
|
|
|
endif()
|
2018-03-12 14:41:51 +08:00
|
|
|
endif()
|