vcpkg/ports/readline-osx/portfile.cmake
zekoz 7862c10c37
[readline] readline port builds for MacOS (#22000)
* [readline] New readline-osx port for MacOS

* Bump port-version of readline and fix version database.

* Remove unnecessary -D_CRT_SECURE_NO_WARNINGS.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-12-28 17:44:34 -08:00

27 lines
896 B
CMake

vcpkg_download_distfile(
ARCHIVE
URLS https://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz
FILENAME readline-8.1.tar.gz
SHA512 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00
)
vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${ARCHIVE}")
file(
COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config.h" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/readline")
file(GLOB headers "${SOURCE_PATH}/*.h")
file(COPY ${headers} DESTINATION "${CURRENT_PACKAGES_DIR}/include/readline")
file(
INSTALL "${SOURCE_PATH}/COPYING"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright)