2018-10-25 03:50:57 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-04-11 19:58:14 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
2017-04-23 23:35:13 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
set(XALANC_VERSION 1.11)
|
2017-04-23 23:35:13 +08:00
|
|
|
|
2017-04-11 19:58:14 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-10-25 03:50:57 +08:00
|
|
|
URLS "http://www-us.apache.org/dist/xalan/xalan-c/sources/xalan_c-${XALANC_VERSION}-src.zip"
|
|
|
|
FILENAME "xalan_c-${XALANC_VERSION}-src.zip"
|
2017-04-11 19:58:14 +08:00
|
|
|
SHA512 2e79a2c8f755c9660ffc94b26b6bd4b140685e05a88d8e5abb19a2f271383a3f2f398b173ef403f65dc33af75206214bd21ac012c39b4c0051b3a9f61f642fe6
|
|
|
|
)
|
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${XALANC_VERSION}
|
|
|
|
PATCHES
|
|
|
|
0001-ALLOW_RTCc_IN_STL.patch
|
|
|
|
0002-no-mfc.patch
|
|
|
|
0003-char16_t.patch
|
|
|
|
0004-macosx-dyld-fallback.patch
|
|
|
|
0005-fix-ftbfs-ld-as-needed.patch
|
|
|
|
0006-fix-testxslt-segfault.patch
|
|
|
|
0007-fix-readme-typos.patch
|
|
|
|
)
|
2017-04-11 19:58:14 +08:00
|
|
|
|
|
|
|
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
|
|
|
|
elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
|
|
|
endif()
|
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
set(ENV{CL} "$ENV{CL} \"/I${CURRENT_INSTALLED_DIR}/include\"")
|
|
|
|
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
|
2017-04-11 19:58:14 +08:00
|
|
|
|
2018-10-25 03:50:57 +08:00
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj
|
|
|
|
OPTIONS_RELEASE /p:XERCESCROOT=${CURRENT_INSTALLED_DIR}
|
|
|
|
OPTIONS_DEBUG /p:XERCESCROOT=${CURRENT_INSTALLED_DIR}/debug
|
|
|
|
LICENSE_SUBPATH c/LICENSE
|
2018-10-26 03:34:45 +08:00
|
|
|
SKIP_CLEAN
|
2018-02-17 20:46:38 +08:00
|
|
|
)
|
2017-04-22 00:37:28 +08:00
|
|
|
|
2017-04-11 19:58:14 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/c/src/xalanc DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.hpp)
|
|
|
|
|
2018-10-26 03:34:45 +08:00
|
|
|
# LocalMsgIndex.hpp and LocalMsgData.hpp are here
|
|
|
|
file(GLOB NLS_INCLUDES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/c/Build/*/VC10/Release/Nls/Include/*.hpp")
|
|
|
|
if(NOT NLS_INCLUDES)
|
|
|
|
message(FATAL_ERROR "Could not locate LocalMsgIndex.hpp")
|
|
|
|
endif()
|
|
|
|
file(COPY ${NLS_INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/xalanc/PlatformSupport)
|
2018-10-25 03:50:57 +08:00
|
|
|
|
2018-10-26 03:34:45 +08:00
|
|
|
vcpkg_clean_msbuild()
|
2017-04-22 00:37:28 +08:00
|
|
|
|
2017-04-11 19:58:14 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/NLS)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/util/MsgLoaders/ICU/resources)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/TestXSLT)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XalanExe)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xalanc/XPathCAPI)
|