2016-10-05 10:30:00 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-11-24 19:07:33 +08:00
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15)
|
2016-10-05 10:30:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2017-11-24 19:07:33 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz"
|
|
|
|
FILENAME "libiconv-1.15.tar.gz"
|
|
|
|
SHA512 1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a
|
2016-10-05 10:30:00 +08:00
|
|
|
)
|
|
|
|
vcpkg_extract_source_archive(${ARCHIVE})
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
2016-10-18 03:30:09 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2016-10-13 05:02:19 +08:00
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Add-export-definitions.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/0002-Config-for-MSVC.patch
|
2016-11-29 05:01:55 +08:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/0003-Fix-uwp.patch
|
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
|
2016-10-05 10:30:00 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2018-01-05 12:32:31 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2016-10-05 10:30:00 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2016-10-18 03:30:09 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv)
|
2016-10-14 05:01:17 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright)
|
2016-10-05 10:30:00 +08:00
|
|
|
|
|
|
|
# clean out the debug include
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|