diff options
| -rw-r--r-- | ports/pdcurses/CONTROL | 2 | ||||
| -rw-r--r-- | ports/pdcurses/portfile.cmake | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/ports/pdcurses/CONTROL b/ports/pdcurses/CONTROL index 928000072..59ad72513 100644 --- a/ports/pdcurses/CONTROL +++ b/ports/pdcurses/CONTROL @@ -1,4 +1,4 @@ Source: pdcurses -Version: 3.8-1 +Version: 3.8-2 Homepage: https://sourceforge.net/projects/pdcurses/ Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index a1c76fda3..98ceaee26 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -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) vcpkg_from_github( @@ -51,20 +47,27 @@ vcpkg_execute_required_process( message(STATUS "Build ${TARGET_TRIPLET}-dbg done") file ( - COPY ${PDC_PDCLIB}.lib + INSTALL ${PDC_PDCLIB}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file ( - COPY ${PDC_PDCLIB}.dll + INSTALL ${PDC_PDCLIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) endif() file( - COPY ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h + INSTALL ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h 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) -vcpkg_copy_pdbs() +vcpkg_copy_pdbs()
\ No newline at end of file |
