mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 04:19:00 +08:00
d6285bc24b
* [expat] Update the version to 2.2.9(support uwp) * [readosm] Fix expat.lib cannot be found * Remove expat:arm-uwp and expat:x64-uwp from fail list in ci.baseline.txt * [apr-util,io2d,skia] Fix expat cannot be found and also update expat * [many ports] Add supports and fix the regressions * Fix new regressions * Fix typo * [io2d] Update expat patch * [io2d,libkml,skia] Fix expat cannot find and also fix typo * [expat] Remove usage * [libkml,vtk] Update expat patch and fix static build * [wxwidgets] Fix static build caused by expat cannot found * Update as review suggestion * Add Port-Version * Remove evpp:x64-osx=fail from ci.baseline.txt * [wxwidgest] Remove unnecessary spaces * [itk] Fix expat cannot be found * fix cmake test port * [wxwidgets] Update Port-Version Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
50 lines
1.4 KiB
CMake
50 lines
1.4 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO libexpat/libexpat
|
|
REF a7bc26b69768f7fb24f0c7976fae24b157b85b13 #tag 2.2.9
|
|
SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd
|
|
HEAD_REF master
|
|
PATCHES
|
|
fix-find-package-by-cmake.patch
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
set(EXPAT_LINKAGE ON)
|
|
else()
|
|
set(EXPAT_LINKAGE OFF)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}/expat
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DEXPAT_BUILD_EXAMPLES=OFF
|
|
-DEXPAT_BUILD_TESTS=OFF
|
|
-DEXPAT_BUILD_TOOLS=OFF
|
|
-DEXPAT_SHARED_LIBS=${EXPAT_LINKAGE}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
if(EXE OR DEBUG_EXE)
|
|
file(REMOVE ${EXE} ${DEBUG_EXE})
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h
|
|
"! defined(XML_STATIC)"
|
|
"/* vcpkg static build ! defined(XML_STATIC) */ 0"
|
|
)
|
|
endif()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
#Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |