mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
[gdal] Enable building of PDBs in release builds as well, copy PDBs over
This commit is contained in:
parent
e7f0cf8694
commit
e3001c78b9
@ -0,0 +1,26 @@
|
||||
From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <m.massing@warped-space.de>
|
||||
Date: Tue, 29 Nov 2016 12:43:58 +0100
|
||||
Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested
|
||||
|
||||
---
|
||||
gdal/nmake.opt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 47c2df8..4844d22 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
|
||||
# Linker debug options
|
||||
!IFDEF DEBUG
|
||||
LDEBUG= /debug
|
||||
+!ELSEIFDEF WITH_PDB
|
||||
+# Ensures that PDB is included in release DLL if so requested
|
||||
+LDEBUG= /debug /opt:ref /opt:icf
|
||||
!ENDIF
|
||||
|
||||
# Uncomment the following if you are building for 64-bit windows
|
||||
--
|
||||
2.10.1.windows.1
|
||||
|
@ -22,7 +22,8 @@ foreach(BUILD_TYPE debug release)
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
|
||||
)
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
|
||||
)
|
||||
endforeach()
|
||||
|
||||
find_program(NMAKE nmake REQUIRED)
|
||||
@ -48,9 +49,10 @@ if(TARGET_TRIPLET MATCHES "x64")
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
list(APPEND NMAKE_OPTIONS
|
||||
PROJ_FLAGS=-DPROJ_STATIC
|
||||
)
|
||||
list(APPEND NMAKE_OPTIONS PROJ_FLAGS=-DPROJ_STATIC)
|
||||
else()
|
||||
# Enables PDBs for release and debug builds
|
||||
list(APPEND NMAKE_OPTIONS WITH_PDB=1)
|
||||
endif()
|
||||
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
@ -117,6 +119,10 @@ else()
|
||||
file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
|
||||
endif()
|
||||
|
||||
# Copy over PDBs
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdal/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/gdal/copyright)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user