2017-01-27 08:27:52 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-04-09 09:41:52 +08:00
|
|
|
|
2017-08-31 05:57:27 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/xerces-c
|
2018-10-25 03:50:57 +08:00
|
|
|
REF Xerces-C_3_2_2
|
|
|
|
SHA512 66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea
|
|
|
|
HEAD_REF trunk
|
2018-11-02 10:47:20 +08:00
|
|
|
PATCHES disable-tests.patch
|
2017-01-27 08:27:52 +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-10-25 03:50:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
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
|
|
|
|
"get_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}")
|
2017-01-27 08:27:52 +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
|
2018-10-25 03:50:57 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c)
|
2017-01-27 08:43:22 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright)
|
2017-04-09 09:41:52 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|