mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-04 16:17:13 +08:00
8a721c2b87
* [xerces-c] Update REF and SHA512 * [sfml] re-trigger ci * [pcl] re-trigger ci * [boost-signals] re-trigger ci * [tmxparser] re-trigger ci * [soil2] switch repo to github * [gtest] re-trigger ci
68 lines
2.2 KiB
CMake
68 lines
2.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO apache/xerces-c
|
|
REF 71cc0e831b522933ae58253fcaf4423a166e6bec #3.2.2
|
|
SHA512 5ddaf84552cd1f685068352c12651780a9f4becd961d8efd0f1f6a21006df00ffb1afe9b9dd86a169f8c57c4f8b651d5477e1accfd7140a7a52aea14b23c9aed
|
|
HEAD_REF trunk
|
|
PATCHES
|
|
disable-tests.patch
|
|
remove-dll-export-macro.patch
|
|
no-symlinks-in-static-build.patch
|
|
)
|
|
|
|
set(DISABLE_ICU ON)
|
|
if("icu" IN_LIST FEATURES)
|
|
set(DISABLE_ICU OFF)
|
|
endif()
|
|
if ("xmlch_wchar" IN_LIST FEATURES)
|
|
set(XMLCHTYPE -Dxmlch-type=wchar_t)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DDISABLE_TESTS=ON
|
|
-DDISABLE_DOC=ON
|
|
-DDISABLE_SAMPLES=ON
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU}
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON
|
|
${XMLCHTYPE}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc)
|
|
else()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc)
|
|
endif()
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents)
|
|
string(REPLACE
|
|
"get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
|
|
"get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
|
|
_contents
|
|
"${_contents}"
|
|
)
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}")
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfig.cmake _contents)
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfig.cmake "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n${_contents}")
|
|
|
|
configure_file(
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
${CURRENT_PACKAGES_DIR}/share/xercesc
|
|
@ONLY
|
|
)
|
|
|
|
file(REMOVE_RECURSE
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
)
|
|
|
|
# Handle copyright
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|