FIX: Project did not build successfully when building as static.

This commit is contained in:
Albert Bezzina 2017-10-19 15:52:59 +02:00
parent 0b75d75f55
commit 039e795567
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()