Merge pull request #2016 from ab-acx/pugixml

Pugixml did not build successfully when building as static.
This commit is contained in:
Alexander Karatarakis 2017-10-20 12:45:19 -07:00 committed by GitHub
commit 08d4ff1262
2 changed files with 17 additions and 12 deletions

View File

@ -1,3 +1,3 @@
Source: pugixml
Version: 1.8.1-1
Version: 1.8.1-2
Description: C++ XML processing library

View File

@ -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()