2017-08-30 23:57:27 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/xerces-c
|
2020-01-29 13:52:41 -06:00
|
|
|
REF v3.2.2
|
|
|
|
SHA512 e4b2d3499fb4d1d1bcaf991ee858f352112683084b9cc7855c0e52e7fc8cc982a8e3cd548fa30718af6a6dee40e460d82ffcd3480a50f7e7516b462b2c2080c6
|
|
|
|
HEAD_REF master
|
2019-06-21 05:44:03 +08:00
|
|
|
PATCHES
|
|
|
|
disable-tests.patch
|
|
|
|
remove-dll-export-macro.patch
|
2019-08-06 12:31:03 -05:00
|
|
|
no-symlinks-in-static-build.patch
|
2017-01-26 16:27:52 -08:00
|
|
|
)
|
|
|
|
|
2018-12-12 20:47:57 +00:00
|
|
|
set(DISABLE_ICU ON)
|
|
|
|
if("icu" IN_LIST FEATURES)
|
|
|
|
set(DISABLE_ICU OFF)
|
|
|
|
endif()
|
2019-03-08 18:18:01 +00:00
|
|
|
if ("xmlch_wchar" IN_LIST FEATURES)
|
|
|
|
set(XMLCHTYPE -Dxmlch-type=wchar_t)
|
|
|
|
endif()
|
2018-12-12 20:47:57 +00:00
|
|
|
|
2018-10-24 20:50:57 +01:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-11-01 19:47:20 -07:00
|
|
|
OPTIONS
|
|
|
|
-DDISABLE_TESTS=ON
|
|
|
|
-DDISABLE_DOC=ON
|
|
|
|
-DDISABLE_SAMPLES=ON
|
2018-12-12 20:47:57 +00:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU}
|
2019-08-12 14:42:45 -07:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON
|
2019-03-08 18:18:01 +00:00
|
|
|
${XMLCHTYPE}
|
2018-10-24 20:50:57 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2020-01-22 02:03:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2018-10-24 20:50:57 +01:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc)
|
2017-01-26 16:43:22 -08:00
|
|
|
else()
|
2018-10-24 20:50:57 +01:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc)
|
2017-01-26 16:43:22 -08:00
|
|
|
endif()
|
2017-01-26 16:27:52 -08:00
|
|
|
|
2018-10-24 20:50:57 +01:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents)
|
|
|
|
string(REPLACE
|
2019-05-21 21:00:24 -07:00
|
|
|
"get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
|
2018-10-24 20:50:57 +01:00
|
|
|
"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}")
|
2017-01-26 16:27:52 -08:00
|
|
|
|
2019-05-21 21:00:24 -07:00
|
|
|
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}")
|
|
|
|
|
2019-03-31 16:35:47 +11:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/xercesc
|
|
|
|
@ONLY
|
|
|
|
)
|
2020-01-29 13:52:41 -06:00
|
|
|
|
2018-10-24 20:50:57 +01:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2017-01-26 16:27:52 -08:00
|
|
|
|
|
|
|
# Handle copyright
|
2020-01-22 02:03:57 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|