[expat] no dllimport declspec for static builds

This commit is contained in:
Brad Anderson 2017-05-17 18:17:40 -06:00
parent e215291013
commit ed0ed79314
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,3 @@
Source: expat
Version: 2.1.1
Description: XML parser library written in C
Version: 2.1.1-1
Description: XML parser library written in C

View File

@ -27,4 +27,10 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
vcpkg_copy_pdbs()
vcpkg_copy_pdbs()
file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/expat_external.h "${EXPAT_EXTERNAL_H}")