Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
NancyLi1013 committed Nov 22, 2019
1 parent 5a161e3 commit 23b16cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 12 additions & 10 deletions ports/pdcurses/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
message(FATAL_ERROR "PDCurses only supports dynamic CRT linkage")
endif()
vcpkg_check_linkage(ONLY_DYNAMIC_CRT)

find_program(NMAKE nmake)

Expand Down Expand Up @@ -49,23 +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
)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright)

vcpkg_copy_pdbs()
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)

# Install usage
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
vcpkg_copy_pdbs()
1 change: 0 additions & 1 deletion ports/pdcurses/usage

This file was deleted.

0 comments on commit 23b16cc

Please sign in to comment.