2017-03-12 20:34:46 +08:00
|
|
|
set(LIBPOPT_VERSION 1.16)
|
|
|
|
set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e60edda37ede171920746d4ae0d5de3c060d15cecfd41ba75b727a811be828d694)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-07-01 12:05:51 +08:00
|
|
|
URLS
|
|
|
|
"https://ftp.openbsd.org/pub/OpenBSD/distfiles/popt-${LIBPOPT_VERSION}.tar.gz"
|
2017-03-12 20:34:46 +08:00
|
|
|
FILENAME "popt-${LIBPOPT_VERSION}.tar.gz"
|
|
|
|
SHA512 ${LIBPOPT_HASH}
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2019-10-08 01:35:13 +08:00
|
|
|
PATCHES
|
|
|
|
0004-vcpkg-fixmsvc.patch
|
2017-03-12 20:34:46 +08:00
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h.cmake" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/popt.def" DESTINATION "${SOURCE_PATH}")
|
2017-03-12 20:34:46 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-03-12 20:34:46 +08:00
|
|
|
OPTIONS -DPOPT_USE_CONFIG=1
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-03-12 20:34:46 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-03-12 20:34:46 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|