From 49c08417c051660d4fa414378e089fc0074d00ad Mon Sep 17 00:00:00 2001 From: huangminzhong Date: Thu, 1 Sep 2022 01:56:20 -0700 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=89=E6=96=B9=E5=BA=93xe?= =?UTF-8?q?rces-c=20cmake=E7=89=88=E6=9C=AC=E6=9E=84=E5=BB=BA=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangminzhong --- xerces-c/cmake/README_zh.md | 65 +++ xerces-c/cmake/xerces-c/config.h.in | 506 ++++++++++++++++++ xerces-c/cmake/xerces-c/src/CMakeLists.txt | 330 ++++++++++++ .../src/third_party_icu/CMakeLists.txt | 41 ++ 4 files changed, 942 insertions(+) create mode 100755 xerces-c/cmake/README_zh.md create mode 100755 xerces-c/cmake/xerces-c/config.h.in create mode 100755 xerces-c/cmake/xerces-c/src/CMakeLists.txt create mode 100755 xerces-c/cmake/xerces-c/src/third_party_icu/CMakeLists.txt diff --git a/xerces-c/cmake/README_zh.md b/xerces-c/cmake/README_zh.md new file mode 100755 index 00000000..0e8137dc --- /dev/null +++ b/xerces-c/cmake/README_zh.md @@ -0,0 +1,65 @@ +# 三方库xerces-c适配脚本的使用 + +## 简介 + +目前三方库xerces-c已适配了OpenHarmony标准系统,本文介绍如何使用这些适配脚本,帮助开发者在Openharmony上快速适配和使用三方库xerces-c + + + +## 使用场景 + +在IDE上开发NAPI接口,工程中需要使用到三方库xerces-c接口能力时,可使用本目录下的适配脚本,将三方库引入自己的工程 + + + +## 三方库版本及license + +- xerces-c: + + 版本:tags/v3.2.3,[下载地址](https://github.com/apache/xerces-c) + + license:Apache License V2.0 + +- icu: + + 版本:tags/OpenHarmony-v3.2-Beta2,[下载地址](https://gitee.com/openharmony/third_party_icu) + + license:ICU License, BSD 3-Clause License + +## 本仓库版本 + +- tpc_c_cplusplus:master,[下载地址](https://gitee.com/openharmony-sig/tpc_c_cplusplus) + + + + +## 工程环境 + +- IDE版本:DevEco Studio 3.0 Beta3 +- OpenHarmony SDK: 3.2.2.5 +- API版本:API9 +- Model:Stage + + + +## 适配步骤 + +- 将下载的三方库xerces-c压缩包解压,并将库目录名修改为xerces-c + +- 将下载的三方库icu压缩包解压,并将库目录名修改为third_party_icu + +- 将下载的本仓库压缩包解压,并将库目录名修改为tpc_c_cplusplus + +- 将三方库third_party_icu拷贝至三方库xerces-c/src目录下 + +- 将tpc_c_cplusplus/xerces-c/cmake/xerces-c/config.h.in修改成config.h,然后拷贝到三方库xerces-c目录下;注意,config.h文件中,如果系统是32位,SIZEOF_LONG的值修改为4,如果系统是64为,值修改为8 + +- 将tpc_c_cplusplus/xerces-c/cmake/xerces-c/src/CMakeLists.txt文件替换三方库xerces-c/src/CMakeLists.txt文件 + +- 将tpc_c_cplusplus/xerces-c/cmake/xerces-c/src/third_party_icu/CMakeLists.txt文件替换三方库xerces-c/src/third_party_icu/CMakeLists.txt文件 + + + +## 使用三方库 + +[将三方库加入IDE(DevEco Studio)工程](../../common/cmake_build.md) \ No newline at end of file diff --git a/xerces-c/cmake/xerces-c/config.h.in b/xerces-c/cmake/xerces-c/config.h.in new file mode 100755 index 00000000..aa261252 --- /dev/null +++ b/xerces-c/cmake/xerces-c/config.h.in @@ -0,0 +1,506 @@ +/* +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/ + + +/* config.h.cmake.in. Not generated, but originated from autoheader. */ +/* This file must be kept up-to-date with needed substitutions from config.h.in. */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CSTDINT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +#if defined(__cplusplus) && defined(HAVE_CSTDINT) +#include +#elif HAVE_STDINT_H +#include +#elif HAVE_INTTYPES_H +#include +#endif + +/* Define to specify no threading is used */ +/* #undef APP_NO_THREADS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H 1 + +/* define if bool is a built-in type */ +#define HAVE_BOOL 1 + +/* Define to 1 if you have the `catclose' function. */ +#define HAVE_CATCLOSE 1 + +/* Define to 1 if you have the `catgets' function. */ +#define HAVE_CATGETS 1 + +/* Define to 1 if you have the `catopen' function. */ +#define HAVE_CATOPEN 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CORESERVICES_CORESERVICES_H */ + +/* Define to 1 if you have cpuid.h */ +/* #undef HAVE_CPUID_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `ftime' function. */ +#define HAVE_FTIME 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `gethostbyaddr' function. */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define to 1 if you have the `gethostbyname' function. */ +#define HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `gmtime_r' function. */ +#define HAVE_GMTIME_R 1 + +/* Define to 1 if you have the `iconv' function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the `iconv_close' function. */ +#define HAVE_ICONV_CLOSE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if you have the `iconv_open' function. */ +#define HAVE_ICONV_OPEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#define HAVE_LIBNSL 1 + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the `localeconv' function. */ +#define HAVE_LOCALECONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* define if the compiler implements L"widestring" */ +#define HAVE_LSTRING 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_ENDIAN_H */ + +/* Define to 1 if you have the `mblen' function. */ +#define HAVE_MBLEN 1 + +/* Define to 1 if you have the `mbrlen' function. */ +#define HAVE_MBRLEN 1 + +/* Define to 1 if you have the `mbsrtowcs' function. */ +#define HAVE_MBSRTOWCS 1 + +/* Define to 1 if you have the `mbstowcs' function. */ +#define HAVE_MBSTOWCS 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* define if the compiler implements namespaces */ +#define HAVE_NAMESPACES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the `nl_langinfo' function. */ +#define HAVE_NL_LANGINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define to 1 if you have the `pathconf' function. */ +#define HAVE_PATHCONF 1 + +/* Define to 1 if you have the PATH_MAX macro. */ +#define HAVE_PATH_MAX 1 + +/* Define if you have POSIX threads libraries and header files. */ +#define HAVE_PTHREAD 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +/* #undef HAVE_STDBOOL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* define if the compiler supports ISO C++ standard library */ +#define HAVE_STD_LIBS 1 + +/* define if the compiler supports the std namespace */ +#define HAVE_STD_NAMESPACE 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `stricmp' function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the `strnicmp' function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMEB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `timegm' function. */ +#define HAVE_TIMEGM 1 + +/* Define to 1 if you have the `towlower' function. */ +#define HAVE_TOWLOWER 1 + +/* Define to 1 if you have the `towupper' function. */ +#define HAVE_TOWUPPER 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the `wcsicmp' function. */ +/* #undef HAVE_WCSICMP */ + +/* Define to 1 if you have the `wcslwr' function. */ +/* #undef HAVE_WCSLWR */ + +/* Define to 1 if you have the `wcsnicmp' function. */ +/* #undef HAVE_WCSNICMP */ + +/* Define to 1 if you have the `wcsrtombs' function. */ +#define HAVE_WCSRTOMBS 1 + +/* Define to 1 if you have the `wcstombs' function. */ +#define HAVE_WCSTOMBS 1 + +/* Define to 1 if you have the `wcsupr' function. */ +/* #undef HAVE_WCSUPR */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have to use const char* with iconv, to 0 if you must use + char*. */ +#define ICONV_USES_CONST_POINTER 0 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Name of package */ +#define PACKAGE "xerces-c" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "xerces-c" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "xerces-c 3.2.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "xerces-c" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.2.3" + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `wchar_t', as computed by sizeof. */ +#define SIZEOF_WCHAR_T 4 + +/* The size of `__int64', as computed by sizeof. */ +#define SIZEOF___INT64 0 + +/* Version number of package */ +#define VERSION "3.2.3" + +/* Define if DLL symbols should be exported */ +/* #undef XERCES_DLL_EXPORT */ + +/* Define if namespaces is supported by the compiler */ +#define XERCES_HAS_CPP_NAMESPACE 1 + +/* Define to have SSE2 instruction support detected at runtime using __cpuid + */ +/* #undef XERCES_HAVE_CPUID_INTRINSIC */ + +/* Define to 1 if you have emmintrin.h */ +/* #undef XERCES_HAVE_EMMINTRIN_H */ + +/* Define to have SSE2 instruction support detected at runtime using + __get_cpuid */ +/* #undef XERCES_HAVE_GETCPUID */ + +/* Define to 1 if you have intrin.h */ +/* #undef XERCES_HAVE_INTRIN_H */ + +/* Define to 1 if we have inttypes.h */ +#define XERCES_HAVE_INTTYPES_H 1 + +/* Define to have SSE2 instruction used at runtime */ +/* #undef XERCES_HAVE_SSE2_INTRINSIC */ + +/* Define to 1 if we have sys/types.h */ +#define XERCES_HAVE_SYS_TYPES_H 1 + +/* Define to have Xerces_autoconf_config.hpp include wchar.h */ +/* #undef XERCES_INCLUDE_WCHAR_H */ + +/* Define if there is support for L"widestring" */ +#define XERCES_LSTRSUPPORT 1 + +/* Define if the isstream library can be included as */ +#define XERCES_NEW_IOSTREAMS 1 + +/* Define to have XMemory.hpp avoid declaring a matching operator delete for + the placement operator new */ +/* #undef XERCES_NO_MATCHING_DELETE_OPERATOR */ + +/* Define if there is no native bool support in this environment */ +/* #undef XERCES_NO_NATIVE_BOOL */ + +/* Define to use backslash as an extra path delimiter character */ +/* #undef XERCES_PATH_DELIMITER_BACKSLASH */ + +/* Define as the platform's export attribute */ +#define XERCES_PLATFORM_EXPORT + +/* Define as the platform's import attribute */ +#define XERCES_PLATFORM_IMPORT + +/* An appropriate signed 16 bit integer type */ +#define XERCES_S16BIT_INT int16_t + +/* An appropriate signed 32 bit integer type */ +#define XERCES_S32BIT_INT int32_t + +/* An appropriate signed 64 bit integer type */ +#define XERCES_S64BIT_INT int64_t + +/* Define as the appropriate SIZE_MAX macro */ +#define XERCES_SIZE_MAX SIZE_MAX + +/* Define as the appropriate size_t type */ +#define XERCES_SIZE_T size_t + +/* Define as the appropriate SSIZE_MAX macro */ +#define XERCES_SSIZE_MAX SSIZE_MAX + +/* Define as the appropriate ssize_t type */ +#define XERCES_SSIZE_T ssize_t + +/* Define if building a static library */ +/* #undef XERCES_STATIC_LIBRARY */ + +/* Define if the std namespace is supported */ +#define XERCES_STD_NAMESPACE 1 + +/* An appropriate unsigned 16 bit integer type */ +#define XERCES_U16BIT_INT uint16_t + +/* An appropriate unsigned 32 bit integer type */ +#define XERCES_U32BIT_INT uint32_t + +/* An appropriate unsigned 64 bit integer type */ +#define XERCES_U64BIT_INT uint64_t + +/* Define to use the POSIX file mgr */ +#define XERCES_USE_FILEMGR_POSIX 1 + +/* Define to use the Windows file mgr */ +/* #undef XERCES_USE_FILEMGR_WINDOWS */ + +/* Define to use the iconv-based MsgLoader */ +/* #undef XERCES_USE_MSGLOADER_ICONV */ + +/* Define to use the ICU-based MsgLoader */ +/* #undef XERCES_USE_MSGLOADER_ICU */ + +/* Define to use the InMemory MsgLoader */ +#define XERCES_USE_MSGLOADER_INMEMORY 1 + +/* Define to use the NoThread mutex mgr */ +/* #undef XERCES_USE_MUTEXMGR_NOTHREAD */ + +/* Define to use the C++11 standard mutex mgr */ +#define XERCES_USE_MUTEXMGR_STD 1 + +/* Define to use the POSIX mutex mgr */ +/* #undef XERCES_USE_MUTEXMGR_POSIX */ + +/* Define to use the Windows mutex mgr */ +/* #undef XERCES_USE_MUTEXMGR_WINDOWS */ + +/* Define to use the Mac OS X CFURL NetAccessor */ +/* #undef XERCES_USE_NETACCESSOR_CFURL */ + +/* Define to use the CURL NetAccessor */ +/* #undef XERCES_USE_NETACCESSOR_CURL */ + +/* Define to use the Sockets-based NetAccessor */ +#define XERCES_USE_NETACCESSOR_SOCKET 1 + +/* Define to use the WinSock NetAccessor */ +/* #undef XERCES_USE_NETACCESSOR_WINSOCK */ + +/* Define to use the GNU iconv transcoder */ +/* #undef XERCES_USE_TRANSCODER_GNUICONV */ + +/* Define to use the iconv transcoder */ +/* #undef XERCES_USE_TRANSCODER_ICONV */ + +/* Define to use the ICU-based transcoder */ +#define XERCES_USE_TRANSCODER_ICU 1 + +/* Define to use the Mac OS UnicodeConverter-based transcoder */ +/* #undef XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER */ + +/* Define to use the Windows transcoder */ +/* #undef XERCES_USE_TRANSCODER_WINDOWS */ + +/* Define to the 16 bit type used to represent Xerces UTF-16 characters */ +#define XERCES_XMLCH_T char16_t + + diff --git a/xerces-c/cmake/xerces-c/src/CMakeLists.txt b/xerces-c/cmake/xerces-c/src/CMakeLists.txt new file mode 100755 index 00000000..5868f071 --- /dev/null +++ b/xerces-c/cmake/xerces-c/src/CMakeLists.txt @@ -0,0 +1,330 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_CXX_STANDARD 17) +project(xerces) + +add_subdirectory(third_party_icu) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-memset-transposed-args -fPIC -std=c++17 -Wno-unused-command-line-argument -frtti -fexceptions -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1 -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-unused-command-line-argument -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1 -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS") + +#message(WARNING "${CMAKE_CXX_FLAGS}") +set(src "xercesc/util/Base64.cpp" + "xercesc/util/BinFileInputStream.cpp" + "xercesc/util/BinInputStream.cpp" + "xercesc/util/BinMemInputStream.cpp" + "xercesc/util/BitSet.cpp" + "xercesc/util/DefaultPanicHandler.cpp" + "xercesc/util/EncodingValidator.cpp" + "xercesc/util/HeaderDummy.cpp" + "xercesc/util/HexBin.cpp" + "xercesc/util/JanitorExports.cpp" + "xercesc/util/KVStringPair.cpp" + "xercesc/util/Mutexes.cpp" + "xercesc/util/PanicHandler.cpp" + "xercesc/util/PlatformUtils.cpp" + "xercesc/util/PSVIUni.cpp" + "xercesc/util/QName.cpp" + "xercesc/util/regx/ASCIIRangeFactory.cpp" + "xercesc/util/regx/BlockRangeFactory.cpp" + "xercesc/util/regx/BMPattern.cpp" + "xercesc/util/regx/CharToken.cpp" + "xercesc/util/regx/ClosureToken.cpp" + "xercesc/util/regx/ConcatToken.cpp" + "xercesc/util/regx/Match.cpp" + "xercesc/util/regx/Op.cpp" + "xercesc/util/regx/OpFactory.cpp" + "xercesc/util/regx/ParenToken.cpp" + "xercesc/util/regx/ParserForXMLSchema.cpp" + "xercesc/util/regx/RangeFactory.cpp" + "xercesc/util/regx/RangeToken.cpp" + "xercesc/util/regx/RangeTokenMap.cpp" + "xercesc/util/regx/RegularExpression.cpp" + "xercesc/util/regx/RegxParser.cpp" + "xercesc/util/regx/RegxUtil.cpp" + "xercesc/util/regx/StringToken.cpp" + "xercesc/util/regx/Token.cpp" + "xercesc/util/regx/TokenFactory.cpp" + "xercesc/util/regx/UnicodeRangeFactory.cpp" + "xercesc/util/regx/UnionToken.cpp" + "xercesc/util/regx/XMLRangeFactory.cpp" + "xercesc/util/regx/XMLUniCharacter.cpp" + "xercesc/util/StringPool.cpp" + "xercesc/util/SynchronizedStringPool.cpp" + "xercesc/util/TransService.cpp" + "xercesc/util/XMemory.cpp" + "xercesc/util/XML256TableTranscoder.cpp" + "xercesc/util/XML88591Transcoder.cpp" + "xercesc/util/XMLAbstractDoubleFloat.cpp" + "xercesc/util/XMLASCIITranscoder.cpp" + "xercesc/util/XMLBigDecimal.cpp" + "xercesc/util/XMLBigInteger.cpp" + "xercesc/util/XMLChar.cpp" + "xercesc/util/XMLChTranscoder.cpp" + "xercesc/util/XMLDateTime.cpp" + "xercesc/util/XMLDouble.cpp" + "xercesc/util/XMLEBCDICTranscoder.cpp" + "xercesc/util/XMLException.cpp" + "xercesc/util/XMLFloat.cpp" + "xercesc/util/XMLIBM1047Transcoder.cpp" + "xercesc/util/XMLIBM1140Transcoder.cpp" + "xercesc/util/XMLInitializer.cpp" + "xercesc/util/XMLMsgLoader.cpp" + "xercesc/util/XMLNumber.cpp" + "xercesc/util/XMLString.cpp" + "xercesc/util/XMLStringTokenizer.cpp" + "xercesc/util/XMLUCS4Transcoder.cpp" + "xercesc/util/XMLUni.cpp" + "xercesc/util/XMLUri.cpp" + "xercesc/util/XMLURL.cpp" + "xercesc/util/XMLUTF16Transcoder.cpp" + "xercesc/util/XMLUTF8Transcoder.cpp" + "xercesc/util/XMLWin1252Transcoder.cpp" + "xercesc/dom/DOMException.cpp" + "xercesc/dom/DOMLSException.cpp" + "xercesc/dom/DOMRangeException.cpp" + "xercesc/dom/DOMXPathException.cpp" + "xercesc/dom/impl/DOMAttrImpl.cpp" + "xercesc/dom/impl/DOMAttrMapImpl.cpp" + "xercesc/dom/impl/DOMAttrNSImpl.cpp" + "xercesc/dom/impl/DOMCDATASectionImpl.cpp" + "xercesc/dom/impl/DOMCharacterDataImpl.cpp" + "xercesc/dom/impl/DOMChildNode.cpp" + "xercesc/dom/impl/DOMCommentImpl.cpp" + "xercesc/dom/impl/DOMConfigurationImpl.cpp" + "xercesc/dom/impl/DOMDeepNodeListImpl.cpp" + "xercesc/dom/impl/DOMDocumentFragmentImpl.cpp" + "xercesc/dom/impl/DOMDocumentImpl.cpp" + "xercesc/dom/impl/DOMDocumentTypeImpl.cpp" + "xercesc/dom/impl/DOMElementImpl.cpp" + "xercesc/dom/impl/DOMElementNSImpl.cpp" + "xercesc/dom/impl/DOMEntityImpl.cpp" + "xercesc/dom/impl/DOMEntityReferenceImpl.cpp" + "xercesc/dom/impl/DOMErrorImpl.cpp" + "xercesc/dom/impl/DOMImplementationImpl.cpp" + "xercesc/dom/impl/DOMImplementationListImpl.cpp" + "xercesc/dom/impl/DOMImplementationRegistry.cpp" + "xercesc/dom/impl/DOMLocatorImpl.cpp" + "xercesc/dom/impl/DOMNamedNodeMapImpl.cpp" + "xercesc/dom/impl/DOMNodeIDMap.cpp" + "xercesc/dom/impl/DOMNodeImpl.cpp" + "xercesc/dom/impl/DOMNodeIteratorImpl.cpp" + "xercesc/dom/impl/DOMNodeListImpl.cpp" + "xercesc/dom/impl/DOMNodeVector.cpp" + "xercesc/dom/impl/DOMNormalizer.cpp" + "xercesc/dom/impl/DOMNotationImpl.cpp" + "xercesc/dom/impl/DOMParentNode.cpp" + "xercesc/dom/impl/DOMProcessingInstructionImpl.cpp" + "xercesc/dom/impl/DOMRangeImpl.cpp" + "xercesc/dom/impl/DOMStringListImpl.cpp" + "xercesc/dom/impl/DOMStringPool.cpp" + "xercesc/dom/impl/DOMTextImpl.cpp" + "xercesc/dom/impl/DOMTreeWalkerImpl.cpp" + "xercesc/dom/impl/DOMTypeInfoImpl.cpp" + "xercesc/dom/impl/DOMLSSerializerImpl.cpp" + "xercesc/dom/impl/DOMLSInputImpl.cpp" + "xercesc/dom/impl/DOMLSOutputImpl.cpp" + "xercesc/dom/impl/DOMXPathExpressionImpl.cpp" + "xercesc/dom/impl/DOMXPathNSResolverImpl.cpp" + "xercesc/dom/impl/DOMXPathResultImpl.cpp" + "xercesc/dom/impl/XSDElementNSImpl.cpp" + "xercesc/framework/BinOutputStream.cpp" + "xercesc/framework/LocalFileFormatTarget.cpp" + "xercesc/framework/LocalFileInputSource.cpp" + "xercesc/framework/MemBufFormatTarget.cpp" + "xercesc/framework/MemBufInputSource.cpp" + "xercesc/framework/psvi/PSVIAttribute.cpp" + "xercesc/framework/psvi/PSVIAttributeList.cpp" + "xercesc/framework/psvi/PSVIElement.cpp" + "xercesc/framework/psvi/PSVIItem.cpp" + "xercesc/framework/psvi/XSAnnotation.cpp" + "xercesc/framework/psvi/XSAttributeDeclaration.cpp" + "xercesc/framework/psvi/XSAttributeGroupDefinition.cpp" + "xercesc/framework/psvi/XSAttributeUse.cpp" + "xercesc/framework/psvi/XSComplexTypeDefinition.cpp" + "xercesc/framework/psvi/XSElementDeclaration.cpp" + "xercesc/framework/psvi/XSFacet.cpp" + "xercesc/framework/psvi/XSIDCDefinition.cpp" + "xercesc/framework/psvi/XSModel.cpp" + "xercesc/framework/psvi/XSModelGroup.cpp" + "xercesc/framework/psvi/XSModelGroupDefinition.cpp" + "xercesc/framework/psvi/XSMultiValueFacet.cpp" + "xercesc/framework/psvi/XSNamespaceItem.cpp" + "xercesc/framework/psvi/XSNotationDeclaration.cpp" + "xercesc/framework/psvi/XSObject.cpp" + "xercesc/framework/psvi/XSParticle.cpp" + "xercesc/framework/psvi/XSSimpleTypeDefinition.cpp" + "xercesc/framework/psvi/XSTypeDefinition.cpp" + "xercesc/framework/psvi/XSValue.cpp" + "xercesc/framework/psvi/XSWildcard.cpp" + "xercesc/framework/StdInInputSource.cpp" + "xercesc/framework/StdOutFormatTarget.cpp" + "xercesc/framework/URLInputSource.cpp" + "xercesc/framework/Wrapper4DOMLSInput.cpp" + "xercesc/framework/Wrapper4InputSource.cpp" + "xercesc/framework/XMLAttDef.cpp" + "xercesc/framework/XMLAttDefList.cpp" + "xercesc/framework/XMLAttr.cpp" + "xercesc/framework/XMLBuffer.cpp" + "xercesc/framework/XMLBufferMgr.cpp" + "xercesc/framework/XMLContentModel.cpp" + "xercesc/framework/XMLDTDDescription.cpp" + "xercesc/framework/XMLElementDecl.cpp" + "xercesc/framework/XMLEntityDecl.cpp" + "xercesc/framework/XMLFormatter.cpp" + "xercesc/framework/XMLGrammarDescription.cpp" + "xercesc/framework/XMLGrammarPoolImpl.cpp" + "xercesc/framework/XMLNotationDecl.cpp" + "xercesc/framework/XMLRecognizer.cpp" + "xercesc/framework/XMLRefInfo.cpp" + "xercesc/framework/XMLSchemaDescription.cpp" + "xercesc/framework/XMLValidator.cpp" + "xercesc/internal/BinFileOutputStream.cpp" + "xercesc/internal/BinMemOutputStream.cpp" + "xercesc/internal/DGXMLScanner.cpp" + "xercesc/internal/ElemStack.cpp" + "xercesc/internal/IGXMLScanner.cpp" + "xercesc/internal/IGXMLScanner2.cpp" + "xercesc/internal/MemoryManagerImpl.cpp" + "xercesc/internal/ReaderMgr.cpp" + "xercesc/internal/SGXMLScanner.cpp" + "xercesc/internal/ValidationContextImpl.cpp" + "xercesc/internal/VecAttributesImpl.cpp" + "xercesc/internal/VecAttrListImpl.cpp" + "xercesc/internal/WFXMLScanner.cpp" + "xercesc/internal/XMLReader.cpp" + "xercesc/internal/XMLScanner.cpp" + "xercesc/internal/XMLScannerResolver.cpp" + "xercesc/internal/XProtoType.cpp" + "xercesc/internal/XSAXMLScanner.cpp" + "xercesc/internal/XSerializeEngine.cpp" + "xercesc/internal/XSObjectFactory.cpp" + "xercesc/internal/XTemplateSerializer.cpp" + "xercesc/parsers/AbstractDOMParser.cpp" + "xercesc/parsers/DOMLSParserImpl.cpp" + "xercesc/parsers/SAX2XMLFilterImpl.cpp" + "xercesc/parsers/SAX2XMLReaderImpl.cpp" + "xercesc/parsers/SAXParser.cpp" + "xercesc/parsers/XercesDOMParser.cpp" + "xercesc/sax/Dummy.cpp" + "xercesc/sax/InputSource.cpp" + "xercesc/sax/SAXException.cpp" + "xercesc/sax/SAXParseException.cpp" + "xercesc/sax2/sax2Dummy.cpp" + "xercesc/validators/common/AllContentModel.cpp" + "xercesc/validators/common/CMAny.cpp" + "xercesc/validators/common/CMBinaryOp.cpp" + "xercesc/validators/common/CMUnaryOp.cpp" + "xercesc/validators/common/ContentLeafNameTypeVector.cpp" + "xercesc/validators/common/ContentSpecNode.cpp" + "xercesc/validators/common/DFAContentModel.cpp" + "xercesc/validators/common/Grammar.cpp" + "xercesc/validators/common/GrammarResolver.cpp" + "xercesc/validators/common/MixedContentModel.cpp" + "xercesc/validators/common/SimpleContentModel.cpp" + "xercesc/validators/datatype/AbstractNumericFacetValidator.cpp" + "xercesc/validators/datatype/AbstractNumericValidator.cpp" + "xercesc/validators/datatype/AbstractStringValidator.cpp" + "xercesc/validators/datatype/AnySimpleTypeDatatypeValidator.cpp" + "xercesc/validators/datatype/AnyURIDatatypeValidator.cpp" + "xercesc/validators/datatype/Base64BinaryDatatypeValidator.cpp" + "xercesc/validators/datatype/BooleanDatatypeValidator.cpp" + "xercesc/validators/datatype/DatatypeValidator.cpp" + "xercesc/validators/datatype/DatatypeValidatorFactory.cpp" + "xercesc/validators/datatype/DateDatatypeValidator.cpp" + "xercesc/validators/datatype/DateTimeDatatypeValidator.cpp" + "xercesc/validators/datatype/DateTimeValidator.cpp" + "xercesc/validators/datatype/DayDatatypeValidator.cpp" + "xercesc/validators/datatype/DecimalDatatypeValidator.cpp" + "xercesc/validators/datatype/DoubleDatatypeValidator.cpp" + "xercesc/validators/datatype/DurationDatatypeValidator.cpp" + "xercesc/validators/datatype/ENTITYDatatypeValidator.cpp" + "xercesc/validators/datatype/FloatDatatypeValidator.cpp" + "xercesc/validators/datatype/HexBinaryDatatypeValidator.cpp" + "xercesc/validators/datatype/IDDatatypeValidator.cpp" + "xercesc/validators/datatype/IDREFDatatypeValidator.cpp" + "xercesc/validators/datatype/ListDatatypeValidator.cpp" + "xercesc/validators/datatype/MonthDatatypeValidator.cpp" + "xercesc/validators/datatype/MonthDayDatatypeValidator.cpp" + "xercesc/validators/datatype/NameDatatypeValidator.cpp" + "xercesc/validators/datatype/NCNameDatatypeValidator.cpp" + "xercesc/validators/datatype/NOTATIONDatatypeValidator.cpp" + "xercesc/validators/datatype/QNameDatatypeValidator.cpp" + "xercesc/validators/datatype/StringDatatypeValidator.cpp" + "xercesc/validators/datatype/TimeDatatypeValidator.cpp" + "xercesc/validators/datatype/UnionDatatypeValidator.cpp" + "xercesc/validators/datatype/XMLCanRepGroup.cpp" + "xercesc/validators/datatype/YearDatatypeValidator.cpp" + "xercesc/validators/datatype/YearMonthDatatypeValidator.cpp" + "xercesc/validators/DTD/DTDAttDef.cpp" + "xercesc/validators/DTD/DTDAttDefList.cpp" + "xercesc/validators/DTD/DTDElementDecl.cpp" + "xercesc/validators/DTD/DTDEntityDecl.cpp" + "xercesc/validators/DTD/DTDGrammar.cpp" + "xercesc/validators/DTD/DTDScanner.cpp" + "xercesc/validators/DTD/DTDValidator.cpp" + "xercesc/validators/DTD/XMLDTDDescriptionImpl.cpp" + "xercesc/validators/schema/ComplexTypeInfo.cpp" + "xercesc/validators/schema/GeneralAttributeCheck.cpp" + "xercesc/validators/schema/identity/FieldActivator.cpp" + "xercesc/validators/schema/identity/FieldValueMap.cpp" + "xercesc/validators/schema/identity/IC_Field.cpp" + "xercesc/validators/schema/identity/IC_Key.cpp" + "xercesc/validators/schema/identity/IC_KeyRef.cpp" + "xercesc/validators/schema/identity/IC_Selector.cpp" + "xercesc/validators/schema/identity/IC_Unique.cpp" + "xercesc/validators/schema/identity/IdentityConstraint.cpp" + "xercesc/validators/schema/identity/IdentityConstraintHandler.cpp" + "xercesc/validators/schema/identity/ValueStore.cpp" + "xercesc/validators/schema/identity/ValueStoreCache.cpp" + "xercesc/validators/schema/identity/XercesXPath.cpp" + "xercesc/validators/schema/identity/XPathMatcher.cpp" + "xercesc/validators/schema/identity/XPathMatcherStack.cpp" + "xercesc/validators/schema/identity/XPathSymbols.cpp" + "xercesc/validators/schema/NamespaceScope.cpp" + "xercesc/validators/schema/SchemaAttDef.cpp" + "xercesc/validators/schema/SchemaAttDefList.cpp" + "xercesc/validators/schema/SchemaElementDecl.cpp" + "xercesc/validators/schema/SchemaGrammar.cpp" + "xercesc/validators/schema/SchemaInfo.cpp" + "xercesc/validators/schema/SchemaSymbols.cpp" + "xercesc/validators/schema/SchemaValidator.cpp" + "xercesc/validators/schema/SubstitutionGroupComparator.cpp" + "xercesc/validators/schema/TraverseSchema.cpp" + "xercesc/validators/schema/XercesAttGroupInfo.cpp" + "xercesc/validators/schema/XercesElementWildcard.cpp" + "xercesc/validators/schema/XercesGroupInfo.cpp" + "xercesc/validators/schema/XMLSchemaDescriptionImpl.cpp" + "xercesc/validators/schema/XSDDOMParser.cpp" + "xercesc/validators/schema/XSDErrorReporter.cpp" + "xercesc/validators/schema/XSDLocator.cpp" + "xercesc/validators/schema/XUtil.cpp" + "xercesc/xinclude/XIncludeDOMDocumentProcessor.cpp" + "xercesc/xinclude/XIncludeLocation.cpp" + "xercesc/xinclude/XIncludeUtils.cpp" + "stricmp.c" + "strnicmp.c" + "xercesc/util/NetAccessors/Socket/SocketNetAccessor.cpp" + "xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp" + "xercesc/util/NetAccessors/BinHTTPInputStreamCommon.cpp" + "xercesc/util/Transcoders/ICU/ICUTransService.cpp" + "xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.cpp" + "xercesc/util/MutexManagers/StdMutexMgr.cpp" + "xercesc/util/FileManagers/PosixFileMgr.cpp") +include_directories(.) +include_directories(..) +include_directories(third_partyt_icu/icu4c/source/common) +#message(WARNING "${src}") +add_library(xerces-c SHARED ${src}) +target_link_libraries(xerces-c PUBLIC icu) \ No newline at end of file diff --git a/xerces-c/cmake/xerces-c/src/third_party_icu/CMakeLists.txt b/xerces-c/cmake/xerces-c/src/third_party_icu/CMakeLists.txt new file mode 100755 index 00000000..27646213 --- /dev/null +++ b/xerces-c/cmake/xerces-c/src/third_party_icu/CMakeLists.txt @@ -0,0 +1,41 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_CXX_STANDARD 11) +project(icu) +#set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes -std=c++11 -O3 -frtti -fexceptions -pedantic -Wno-unused-parameter -Wno-unused-const-variable -Wno-unneeded-internal-declaration") +#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ") +set(LibIcuSrc "${CMAKE_CURRENT_SOURCE_DIR}/icu4c/source") +include_directories( + ${LibIcuSrc} + ${LibIcuSrc}/common + ${LibIcuSrc}/i18n + ) +add_definitions( + -DU_ATTRIBUTE_DEPRECATED= + -DU_COMMON_IMPLEMENTATION + -DUPRV_BLOCK_MACRO_BEGIN= + -DUPRV_BLOCK_MACRO_END= + -DUCONFIG_USE_WINDOWS_LCID_MAPPING_API=0 + -D_REENTRANT + ) +set(icustubdata "icu4c/source/stubdata/stubdata.cpp") +aux_source_directory(icu4c/source/common icucommon) + +set(src ${icucommon} + ${icustubdata} + ) + +add_library(icu SHARED ${src}) -- Gitee