2020-01-07 06:42:52 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
2018-03-12 14:41:51 +08:00
|
|
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
2020-11-18 01:18:59 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/Iconv)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv)
|
2018-03-12 14:41:51 +08:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2020-01-07 06:42:52 +08:00
|
|
|
set(LIBICONV_VERSION 1.16)
|
2018-12-12 02:17:31 +08:00
|
|
|
|
2016-10-05 10:30:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2019-01-08 04:52:45 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz"
|
2018-12-12 02:17:31 +08:00
|
|
|
FILENAME "libiconv-${LIBICONV_VERSION}.tar.gz"
|
2020-01-07 06:42:52 +08:00
|
|
|
SHA512 365dac0b34b4255a0066e8033a8b3db4bdb94b9b57a9dca17ebf2d779139fe935caf51a465d17fd8ae229ec4b926f3f7025264f37243432075e5583925bb77b7
|
2016-10-05 10:30:00 +08:00
|
|
|
)
|
2018-12-12 02:17:31 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${LIBICONV_VERSION}
|
|
|
|
PATCHES
|
|
|
|
0002-Config-for-MSVC.patch
|
2020-01-07 06:42:52 +08:00
|
|
|
0003-Add-export.patch
|
2018-12-12 02:17:31 +08:00
|
|
|
)
|
2016-10-05 10:30:00 +08:00
|
|
|
|
2020-11-18 01:18:59 +08:00
|
|
|
vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
DETERMINE_BUILD_TRIPLET
|
|
|
|
USE_WRAPPERS
|
|
|
|
OPTIONS
|
|
|
|
--enable-relocatable
|
|
|
|
--enable-extra-encodings
|
|
|
|
--without-libiconv-prefix
|
|
|
|
--without-libintl-prefix
|
|
|
|
${OPTIONS}
|
|
|
|
)
|
|
|
|
vcpkg_install_make()
|
2018-03-12 14:41:51 +08:00
|
|
|
|
2018-01-05 12:32:31 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2020-11-18 01:18:59 +08:00
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin)
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin)
|
2016-10-05 10:30:00 +08:00
|
|
|
|
2020-11-18 01:18:59 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/iconv)
|
2020-06-02 08:55:23 +08:00
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
2018-08-31 08:07:14 +08:00
|
|
|
|
2020-11-18 01:18:59 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled)
|