Merge pull request #9042 from NancyLi1013/dev/NancyLi/4848-add-usage-for-pdcurses

[pdcurses] Fix linkage error
This commit is contained in:
Robert Schumacher 2019-11-22 14:56:43 -08:00 committed by GitHub
commit ea5a57338e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,4 @@
Source: pdcurses Source: pdcurses
Version: 3.8-1 Version: 3.8-2
Homepage: https://sourceforge.net/projects/pdcurses/ Homepage: https://sourceforge.net/projects/pdcurses/
Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model.

View File

@ -1,9 +1,5 @@
vcpkg_check_linkage(ONLY_DYNAMIC_CRT)
if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
message(FATAL_ERROR "PDCurses only supports dynamic CRT linkage")
endif()
include(vcpkg_common_functions)
find_program(NMAKE nmake) find_program(NMAKE nmake)
vcpkg_from_github( vcpkg_from_github(
@ -51,20 +47,27 @@ vcpkg_execute_required_process(
message(STATUS "Build ${TARGET_TRIPLET}-dbg done") message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
file ( file (
COPY ${PDC_PDCLIB}.lib INSTALL ${PDC_PDCLIB}.lib
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
) )
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file ( file (
COPY ${PDC_PDCLIB}.dll INSTALL ${PDC_PDCLIB}.dll
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
) )
endif() endif()
file( file(
COPY ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h INSTALL ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include
) )
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(READ ${CURRENT_PACKAGES_DIR}/include/curses.h _contents)
string(REPLACE "#ifdef PDC_DLL_BUILD" "#if 1" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/include/curses.h "${_contents}")
endif()
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright)
vcpkg_copy_pdbs() vcpkg_copy_pdbs()