aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <lirui09@beyondsoft.com>2019-11-21 21:50:36 -0800
committerNancyLi1013 <lirui09@beyondsoft.com>2019-11-21 21:51:38 -0800
commit23b16cc4a0de1bf8cdee5cf8a445874222d98d28 (patch)
treee49dd42b3f820e89283d00edb99b89896c5334e7
parent5a161e316b7e30b36e2990d03416c4ac0dc5f8ae (diff)
downloadvcpkg-23b16cc4a0de1bf8cdee5cf8a445874222d98d28.tar.gz
vcpkg-23b16cc4a0de1bf8cdee5cf8a445874222d98d28.zip
Update
-rw-r--r--ports/pdcurses/portfile.cmake22
-rw-r--r--ports/pdcurses/usage1
2 files changed, 12 insertions, 11 deletions
diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake
index 565427abb..98ceaee26 100644
--- a/ports/pdcurses/portfile.cmake
+++ b/ports/pdcurses/portfile.cmake
@@ -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)
@@ -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) \ No newline at end of file
+vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/pdcurses/usage b/ports/pdcurses/usage
deleted file mode 100644
index 794e4f758..000000000
--- a/ports/pdcurses/usage
+++ /dev/null
@@ -1 +0,0 @@
-Define PDC_DLL_BUILD to import external variables if building pdcurses as a DLL on Windows. \ No newline at end of file