2017-08-31 05:57:27 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/xerces-c
|
2020-04-18 05:10:35 +08:00
|
|
|
REF v3.2.3
|
|
|
|
SHA512 aaafe2de4ea156d94e71e3631c79bd66660badf17bf2a19587a0ca34011f70bd1584a0beef909409a3ff05eecea9d37ffee6dbb267625f59217fd86705d2cd28
|
2020-01-30 03:52:41 +08:00
|
|
|
HEAD_REF master
|
2019-06-21 05:44:03 +08:00
|
|
|
PATCHES
|
|
|
|
disable-tests.patch
|
|
|
|
remove-dll-export-macro.patch
|
2017-01-27 08:27:52 +08:00
|
|
|
)
|
|
|
|
|
2018-12-13 04:47:57 +08:00
|
|
|
set(DISABLE_ICU ON)
|
|
|
|
if("icu" IN_LIST FEATURES)
|
|
|
|
set(DISABLE_ICU OFF)
|
|
|
|
endif()
|
2020-07-03 12:12:23 +08:00
|
|
|
if ("xmlch-wchar" IN_LIST FEATURES)
|
2019-03-09 02:18:01 +08:00
|
|
|
set(XMLCHTYPE -Dxmlch-type=wchar_t)
|
|
|
|
endif()
|
2018-12-13 04:47:57 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-11-02 10:47:20 +08:00
|
|
|
OPTIONS
|
|
|
|
-DDISABLE_TESTS=ON
|
|
|
|
-DDISABLE_DOC=ON
|
|
|
|
-DDISABLE_SAMPLES=ON
|
2018-12-13 04:47:57 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU}
|
2019-08-13 05:42:45 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON
|
2019-03-09 02:18:01 +08:00
|
|
|
${XMLCHTYPE}
|
2018-10-25 03:50:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2020-01-22 02:03:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc)
|
2017-01-27 08:43:22 +08:00
|
|
|
else()
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc)
|
2017-01-27 08:43:22 +08:00
|
|
|
endif()
|
2017-01-27 08:27:52 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents)
|
|
|
|
string(REPLACE
|
2019-05-22 12:00:24 +08: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-25 03:50:57 +08: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-27 08:27:52 +08:00
|
|
|
|
2019-05-22 12:00:24 +08: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 13:35:47 +08:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/xercesc
|
|
|
|
@ONLY
|
|
|
|
)
|
2020-01-30 03:52:41 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
)
|
2017-01-27 08: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)
|