aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Massing <m.massing@warped-space.de>2016-11-30 10:26:18 +0100
committerManuel Massing <m.massing@warped-space.de>2016-11-30 10:38:56 +0100
commite3001c78b91531b5170181935fd7b0293fdb82a8 (patch)
treefa383692d35f4adfd7094309aa1e855841c2e45b
parente7f0cf8694badd1ee0b9c55d2d956c4d291fec0f (diff)
downloadvcpkg-e3001c78b91531b5170181935fd7b0293fdb82a8.tar.gz
vcpkg-e3001c78b91531b5170181935fd7b0293fdb82a8.zip
[gdal] Enable building of PDBs in release builds as well, copy PDBs over
-rw-r--r--ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch26
-rw-r--r--ports/gdal/portfile.cmake14
2 files changed, 36 insertions, 4 deletions
diff --git a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
new file mode 100644
index 000000000..1065a2982
--- /dev/null
+++ b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
@@ -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
+
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake
index 698c96a5c..ee003d622 100644
--- a/ports/gdal/portfile.cmake
+++ b/ports/gdal/portfile.cmake
@@ -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)