diff --git a/expat/cmake/expat-config.cmake.in b/expat/cmake/expat-config.cmake.in index ca090168..163a55d3 100644 --- a/expat/cmake/expat-config.cmake.in +++ b/expat/cmake/expat-config.cmake.in @@ -53,8 +53,19 @@ _register_component(dtd @EXPAT_DTD@) _register_component(large_size @EXPAT_LARGE_SIZE@) _register_component(min_size @EXPAT_MIN_SIZE@) _register_component(ns @EXPAT_NS@) -_register_component(unicode @_EXPAT_UNICODE@) -_register_component(unicode_wchar_t @_EXPAT_UNICODE_WCHAR_T@) +if("@EXPAT_CHAR_TYPE@" STREQUAL "char") + _register_component(char ON) + _register_component(ushort OFF) + _register_component(wchar_t OFF) +elseif("@EXPAT_CHAR_TYPE@" STREQUAL "ushort") + _register_component(char OFF) + _register_component(ushort ON) + _register_component(wchar_t OFF) +elseif("@EXPAT_CHAR_TYPE@" STREQUAL "wchar_t") + _register_component(char OFF) + _register_component(ushort OFF) + _register_component(wchar_t ON) +endif() check_required_components(expat)