Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pdcurses] Add export CMake config #31453

Merged
merged 10 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ports/pdcurses/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wmcbrine/PDCurses
REF 6c1f95c4fa9f9f105879c2d99dd72a5bf335c046 # 3.9
SHA512 2d682a3516baaa58a97854aca64d985768b7af76d998240b54afc57ddf2a44894835a1748888f8dd7c1cc8045ede77488284f8adf1b73878879b4b4d3391218d
REF f2d31a2633eb042f7bf1f79cba81522915a04579 # committed on 2022-10-20
SHA512 2fbd82f5ab4dafea5a6ad87645a1e995963c814c062501760315d362a6cd0f6f2c9143c5e28f15db4d11ee77164f0ec5e920386fa0b92fdba195cc6452eee1b9
HEAD_REF master
PATCHES
nmake-install.patch
Expand Down Expand Up @@ -39,4 +39,5 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
endif()
endif()

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-pdcurses-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}")
vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/LICENSE")
18 changes: 18 additions & 0 deletions ports/pdcurses/unofficial-pdcurses-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
if(NOT TARGET unofficial::pdcurses::pdcurses)
add_library(unofficial::pdcurses::pdcurses UNKNOWN IMPORTED)
get_filename_component(z_vcpkg_pdcurses_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(z_vcpkg_pdcurses_root "${z_vcpkg_pdcurses_root}" PATH)
get_filename_component(z_vcpkg_pdcurses_root "${z_vcpkg_pdcurses_root}" PATH)

find_library(Z_VCPKG_PDCURSES_LIBRARY_RELEASE NAMES pdcurses PATHS "${z_vcpkg_pdcurses_root}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(Z_VCPKG_PDCURSES_LIBRARY_DEBUG NAMES pdcurses PATHS "${z_vcpkg_pdcurses_root}/debug/lib" NO_DEFAULT_PATH REQUIRED)

set_target_properties(unofficial::pdcurses::pdcurses PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${z_vcpkg_pdcurses_root}/include"
IMPORTED_LOCATION_DEBUG "${Z_VCPKG_PDCURSES_LIBRARY_DEBUG}"
IMPORTED_LOCATION_RELEASE "${Z_VCPKG_PDCURSES_LIBRARY_RELEASE}"
IMPORTED_CONFIGURATIONS "Release;Debug"
LilyWangLL marked this conversation as resolved.
Show resolved Hide resolved
)

unset(z_vcpkg_pdcurses_root)
endif()
4 changes: 2 additions & 2 deletions ports/pdcurses/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "pdcurses",
"version": "3.9",
"port-version": 4,
"version-date": "2023-05-16",
LilyWangLL marked this conversation as resolved.
Show resolved Hide resolved
"description": "Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model.",
"homepage": "https://pdcurses.org/",
"license": null,
"supports": "windows & !uwp & !mingw"
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6149,8 +6149,8 @@
"port-version": 0
},
"pdcurses": {
"baseline": "3.9",
"port-version": 4
"baseline": "2023-05-16",
"port-version": 0
},
"pdqsort": {
"baseline": "2019-07-30",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/pdcurses.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "50239babe7c8f5eed572a46016b54e40323eb041",
"version-date": "2023-05-16",
"port-version": 0
},
{
"git-tree": "cb1edd90103d19fa2ecf7e6343416a35714ffe43",
"version": "3.9",
Expand Down