Adds PDBs and 64-bit builds to PDCurses

This commit is contained in:
John Camp 2016-11-15 14:33:02 -05:00
parent df207430c9
commit 10f1403555

View File

@ -1,8 +1,4 @@
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
message(FATAL_ERROR "64-bit builds are not supported for PDCurses.")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
find_program(NMAKE nmake)
@ -14,10 +10,16 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
set(PDC_NMAKE_CMD ${NMAKE} -f vcwin32.mak WIDE=Y UTF8=Y)
set(PDC_NMAKE_CMD ${NMAKE} /A -f vcwin32.mak WIDE=Y UTF8=Y)
set(PDC_NMAKE_CWD ${SOURCE_PATH}/win32)
set(PDC_PDCLIB ${SOURCE_PATH}/win32/pdcurses)
file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK)
string(REPLACE "-Z7" "-ZI -Fdpdcurses.pdb" PDC_MAK ${PDC_MAK})
string(REPLACE " -pdb:none" "" PDC_MAK ${PDC_MAK})
string(REPLACE "/MACHINE:IX86 " "" PDC_MAK ${PDC_MAK})
file(WRITE ${SOURCE_PATH}/win32/vcwin32.mak ${PDC_MAK})
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y)
endif()