2018-03-12 14:41:51 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
2018-04-18 07:16:23 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv)
|
2018-04-04 06:59:54 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv)
|
2018-03-12 14:41:51 +08:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2016-10-05 10:30:00 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-12-12 02:17:31 +08:00
|
|
|
|
|
|
|
set(LIBICONV_VERSION 1.15)
|
|
|
|
|
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"
|
2017-11-24 19:07:33 +08:00
|
|
|
SHA512 1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a
|
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
|
|
|
|
0001-Add-export-definitions.patch
|
|
|
|
0002-Config-for-MSVC.patch
|
|
|
|
)
|
2016-10-05 10:30:00 +08:00
|
|
|
|
|
|
|
#Since libiconv uses automake, make and configure, we use a custom CMake file
|
2016-10-18 03:30:09 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
2016-10-13 05:02:19 +08:00
|
|
|
|
2016-10-05 10:30:00 +08:00
|
|
|
vcpkg_configure_cmake(
|
2016-10-18 03:30:09 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-11-24 19:07:33 +08:00
|
|
|
PREFER_NINJA
|
2018-03-12 14:41:51 +08:00
|
|
|
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
2016-10-05 10:30:00 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2018-03-12 14:41:51 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv)
|
|
|
|
|
2018-01-05 12:32:31 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2016-10-05 10:30:00 +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
|
|
|
|
2019-01-08 04:52:45 +08:00
|
|
|
vcpkg_test_cmake(PACKAGE_NAME unofficial-iconv)
|