diff --git a/expat/cmake/expat-config.cmake.in b/expat/cmake/expat-config.cmake.in index 163a55d3..a4da61e0 100644 --- a/expat/cmake/expat-config.cmake.in +++ b/expat/cmake/expat-config.cmake.in @@ -39,32 +39,34 @@ include("${CMAKE_CURRENT_LIST_DIR}/expat.cmake") # # Supported components # -macro(_register_component _NAME _AVAILABE) +macro(expat_register_component _NAME _AVAILABE) set(expat_${_NAME}_FOUND ${_AVAILABE}) endmacro() -_register_component(attr_info @EXPAT_ATTR_INFO@) +expat_register_component(attr_info @EXPAT_ATTR_INFO@) +expat_register_component(dtd @EXPAT_DTD@) +expat_register_component(large_size @EXPAT_LARGE_SIZE@) +expat_register_component(min_size @EXPAT_MIN_SIZE@) +expat_register_component(ns @EXPAT_NS@) + if(@EXPAT_CONTEXT_BYTES@) - _register_component(context_bytes ON) + expat_register_component(context_bytes ON) else() - _register_component(context_bytes OFF) + expat_register_component(context_bytes OFF) endif() -_register_component(dtd @EXPAT_DTD@) -_register_component(large_size @EXPAT_LARGE_SIZE@) -_register_component(min_size @EXPAT_MIN_SIZE@) -_register_component(ns @EXPAT_NS@) + if("@EXPAT_CHAR_TYPE@" STREQUAL "char") - _register_component(char ON) - _register_component(ushort OFF) - _register_component(wchar_t OFF) + expat_register_component(char ON) + expat_register_component(ushort OFF) + expat_register_component(wchar_t OFF) elseif("@EXPAT_CHAR_TYPE@" STREQUAL "ushort") - _register_component(char OFF) - _register_component(ushort ON) - _register_component(wchar_t OFF) + expat_register_component(char OFF) + expat_register_component(ushort ON) + expat_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) + expat_register_component(char OFF) + expat_register_component(ushort OFF) + expat_register_component(wchar_t ON) endif() check_required_components(expat)