aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-10-20 12:45:19 -0700
committerGitHub <noreply@github.com>2017-10-20 12:45:19 -0700
commit08d4ff126218d13fc7d7923ae45851b6748829fc (patch)
tree6ac441eac253550cf80dad40029828eddcba265b
parent7fb0342b8a16b43ce9887fcc879a2321954646be (diff)
parent039e795567edd2fc6a2c8597f150e68d71920f5b (diff)
downloadvcpkg-08d4ff126218d13fc7d7923ae45851b6748829fc.tar.gz
vcpkg-08d4ff126218d13fc7d7923ae45851b6748829fc.zip
Merge pull request #2016 from ab-acx/pugixml
Pugixml did not build successfully when building as static.
-rw-r--r--ports/pugixml/CONTROL2
-rw-r--r--ports/pugixml/portfile.cmake27
2 files changed, 17 insertions, 12 deletions
diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL
index 5fc5f1e4e..01679ea6e 100644
--- a/ports/pugixml/CONTROL
+++ b/ports/pugixml/CONTROL
@@ -1,3 +1,3 @@
Source: pugixml
-Version: 1.8.1-1
+Version: 1.8.1-2
Description: C++ XML processing library
diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake
index 4fcbec84b..0d5123974 100644
--- a/ports/pugixml/portfile.cmake
+++ b/ports/pugixml/portfile.cmake
@@ -7,17 +7,22 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch
-)
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)"
-)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ )
+else()
+ vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch
+ )
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)"
+ )
+endif()
vcpkg_install_cmake()
vcpkg_copy_pdbs()