Haibo Huang | 40a7191 | 2019-10-11 11:13:39 -0700 | [diff] [blame] | 1 | # __ __ _ |
| 2 | # ___\ \/ /_ __ __ _| |_ |
| 3 | # / _ \\ /| '_ \ / _` | __| |
| 4 | # | __// \| |_) | (_| | |_ |
| 5 | # \___/_/\_\ .__/ \__,_|\__| |
| 6 | # |_| XML parser |
| 7 | # |
| 8 | # Copyright (c) 2019 Expat development team |
| 9 | # Licensed under the MIT license: |
| 10 | # |
| 11 | # Permission is hereby granted, free of charge, to any person obtaining |
| 12 | # a copy of this software and associated documentation files (the |
| 13 | # "Software"), to deal in the Software without restriction, including |
| 14 | # without limitation the rights to use, copy, modify, merge, publish, |
| 15 | # distribute, sublicense, and/or sell copies of the Software, and to permit |
| 16 | # persons to whom the Software is furnished to do so, subject to the |
| 17 | # following conditions: |
| 18 | # |
| 19 | # The above copyright notice and this permission notice shall be included |
| 20 | # in all copies or substantial portions of the Software. |
| 21 | # |
| 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 23 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 24 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN |
| 25 | # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
| 26 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
| 27 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
| 28 | # USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 29 | # |
| 30 | if(NOT _expat_config_included) |
| 31 | # Protect against multiple inclusion |
| 32 | set(_expat_config_included TRUE) |
| 33 | |
| 34 | |
| 35 | include("${CMAKE_CURRENT_LIST_DIR}/expat.cmake") |
| 36 | |
| 37 | @PACKAGE_INIT@ |
| 38 | |
| 39 | # |
| 40 | # Supported components |
| 41 | # |
| 42 | macro(expat_register_component _NAME _AVAILABE) |
| 43 | set(expat_${_NAME}_FOUND ${_AVAILABE}) |
| 44 | endmacro() |
| 45 | |
| 46 | expat_register_component(attr_info @EXPAT_ATTR_INFO@) |
| 47 | expat_register_component(dtd @EXPAT_DTD@) |
| 48 | expat_register_component(large_size @EXPAT_LARGE_SIZE@) |
| 49 | expat_register_component(min_size @EXPAT_MIN_SIZE@) |
| 50 | expat_register_component(ns @EXPAT_NS@) |
| 51 | |
| 52 | if(@EXPAT_CONTEXT_BYTES@) |
| 53 | expat_register_component(context_bytes ON) |
| 54 | else() |
| 55 | expat_register_component(context_bytes OFF) |
| 56 | endif() |
| 57 | |
| 58 | if("@EXPAT_CHAR_TYPE@" STREQUAL "char") |
| 59 | expat_register_component(char ON) |
| 60 | expat_register_component(ushort OFF) |
| 61 | expat_register_component(wchar_t OFF) |
| 62 | elseif("@EXPAT_CHAR_TYPE@" STREQUAL "ushort") |
| 63 | expat_register_component(char OFF) |
| 64 | expat_register_component(ushort ON) |
| 65 | expat_register_component(wchar_t OFF) |
| 66 | elseif("@EXPAT_CHAR_TYPE@" STREQUAL "wchar_t") |
| 67 | expat_register_component(char OFF) |
| 68 | expat_register_component(ushort OFF) |
| 69 | expat_register_component(wchar_t ON) |
| 70 | endif() |
| 71 | |
| 72 | check_required_components(expat) |
| 73 | |
| 74 | |
| 75 | endif(NOT _expat_config_included) |