]> granicus.if.org Git - libexpat/commitdiff
CMake: Migrate files from Windows to Unix line endings
authordos2unix <dos2unix@example.org>
Sat, 10 Aug 2019 21:50:29 +0000 (23:50 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 10 Aug 2019 21:52:10 +0000 (23:52 +0200)
expat/CMake.README
expat/CMakeLists.txt
expat/Changes
expat/ConfigureChecks.cmake
expat/expat_config.h.cmake

index fa6823a9bb3117927b363e808d1826686e5a8c1b..685c23d71c2fd6e8d94a347ee730d99af568ba8a 100644 (file)
@@ -1,42 +1,42 @@
-== How to build expat with cmake (experimental) ==\r
-\r
-The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual \r
-Studio) and should work on all other platform cmake supports.\r
-\r
-Assuming ~/expat-2.2.7 is the source directory of expat, add a subdirectory\r
-build and change into that directory:\r
-~/expat-2.2.7$ mkdir build && cd build\r
-~/expat-2.2.7/build$\r
-\r
-From that directory, call cmake first, then call make, make test and \r
-make install in the usual way:\r
-~/expat-2.2.7/build$ cmake ..\r
--- The C compiler identification is GNU\r
--- The CXX compiler identification is GNU\r
-....\r
--- Configuring done\r
--- Generating done\r
--- Build files have been written to: /home/patrick/expat-2.2.7/build\r
-\r
-If you want to specify the install location for your files, append \r
--DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.\r
-\r
-~/expat-2.2.7/build$ make && make test && make install\r
-Scanning dependencies of target expat\r
-[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o\r
-[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o\r
-....\r
--- Installing: /usr/local/lib/pkgconfig/expat.pc\r
--- Installing: /usr/local/bin/xmlwf\r
--- Installing: /usr/local/share/man/man1/xmlwf.1\r
-\r
-For Windows builds, you must make sure to call cmake from an environment where \r
-your compiler is reachable, that means either you call it from the \r
-Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and\r
-make sure that gcc can be called. On Windows, you also might want to specify a \r
-special Generator for CMake:\r
-for Visual Studio builds do: \r
-cmake .. -G "Visual Studio 10" && vcexpress expat.sln\r
-for mingw builds do: \r
-cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install \r
-    && gmake && gmake install\r
+== How to build expat with cmake (experimental) ==
+
+The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual 
+Studio) and should work on all other platform cmake supports.
+
+Assuming ~/expat-2.2.7 is the source directory of expat, add a subdirectory
+build and change into that directory:
+~/expat-2.2.7$ mkdir build && cd build
+~/expat-2.2.7/build$
+
+From that directory, call cmake first, then call make, make test and 
+make install in the usual way:
+~/expat-2.2.7/build$ cmake ..
+-- The C compiler identification is GNU
+-- The CXX compiler identification is GNU
+....
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /home/patrick/expat-2.2.7/build
+
+If you want to specify the install location for your files, append 
+-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
+
+~/expat-2.2.7/build$ make && make test && make install
+Scanning dependencies of target expat
+[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
+[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
+....
+-- Installing: /usr/local/lib/pkgconfig/expat.pc
+-- Installing: /usr/local/bin/xmlwf
+-- Installing: /usr/local/share/man/man1/xmlwf.1
+
+For Windows builds, you must make sure to call cmake from an environment where 
+your compiler is reachable, that means either you call it from the 
+Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
+make sure that gcc can be called. On Windows, you also might want to specify a 
+special Generator for CMake:
+for Visual Studio builds do: 
+cmake .. -G "Visual Studio 10" && vcexpress expat.sln
+for mingw builds do: 
+cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install 
+    && gmake && gmake install
index e2098e0e427f67cc7e319665fa3a6ef5f6444de2..5dbfca81cc3188aeaaa61ea018497dd660cdef87 100644 (file)
-# This file is copyrighted under the BSD-license for buildsystem files of KDE\r
-# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>\r
-\r
-project(expat)\r
-\r
-cmake_minimum_required(VERSION 2.8.10)\r
-set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")\r
-set(PACKAGE_NAME "expat")\r
-set(PACKAGE_VERSION "2.2.7")\r
-set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")\r
-set(PACKAGE_TARNAME "${PACKAGE_NAME}")\r
-\r
-include(GNUInstallDirs)\r
-\r
-if(WINCE)\r
-    set(BUILD_tools_default OFF)\r
-else()\r
-    set(BUILD_tools_default ON)\r
-endif()\r
-if(MSVC OR NOT BUILD_tools_default)\r
-    set(BUILD_doc_default OFF)\r
-else()\r
-    find_program(DOCBOOK_TO_MAN NAMES docbook2x-man db2x_docbook2man docbook2man docbook-to-man)\r
-    if(DOCBOOK_TO_MAN)\r
-        set(BUILD_doc_default ON)\r
-    else()\r
-        set(BUILD_doc_default OFF)\r
-    endif()\r
-endif()\r
-\r
-option(BUILD_tools "build the xmlwf tool for expat library" ${BUILD_tools_default})\r
-option(BUILD_examples "build the examples for expat library" ON)\r
-option(BUILD_tests "build the tests for expat library" ON)\r
-option(BUILD_shared "build a shared expat library" ON)\r
-option(BUILD_doc "build man page for xmlwf" ${BUILD_doc_default})\r
-option(USE_libbsd "utilize libbsd (for arc4random_buf)" OFF)\r
-option(INSTALL "install expat files in cmake install target" ON)\r
-\r
-if(USE_libbsd)\r
-    find_library(LIB_BSD NAMES bsd)\r
-    if(NOT LIB_BSD)\r
-        message(FATAL_ERROR "USE_libbsd option is enabled, but libbsd was not found")\r
-    else()\r
-        set(HAVE_LIBBSD TRUE)\r
-    endif()\r
-endif()\r
-\r
-# configuration options\r
-set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")\r
-option(XML_DTD "Define to make parameter entity parsing functionality available" ON)\r
-option(XML_NS "Define to make XML Namespaces functionality available" ON)\r
-option(WARNINGS_AS_ERRORS "Treat all compiler warnings as errors" OFF)\r
-if(NOT WIN32)\r
-    option(XML_DEV_URANDOM "Define to include code reading entropy from `/dev/urandom'." ON)\r
-    if(XML_DEV_URANDOM)\r
-        set(XML_DEV_URANDOM 1)\r
-    else(XML_DEV_URANDOM)\r
-        set(XML_DEV_URANDOM 0)\r
-    endif(XML_DEV_URANDOM)\r
-endif()\r
-if (NOT WIN32)\r
-    set(USE_GETRANDOM "AUTO" CACHE STRING\r
-            "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")\r
-    set(USE_SYS_GETRANDOM "AUTO" CACHE STRING\r
-            "Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]")\r
-endif()\r
-option(XML_UNICODE "Use UTF-16 encoded chars (two bytes) instead of UTF-8" OFF)\r
-option(XML_UNICODE_WCHAR_T "Use wchar_t to represent UTF-16 instead of unsigned short" OFF)\r
-option(XML_ATTR_INFO "Define to allow retrieving the byte offsets for attribute names and values" OFF)\r
-\r
-if(XML_DTD)\r
-    set(XML_DTD 1)\r
-else(XML_DTD)\r
-    set(XML_DTD 0)\r
-endif(XML_DTD)\r
-if(XML_NS)\r
-    set(XML_NS 1)\r
-else(XML_NS)\r
-    set(XML_NS 0)\r
-endif(XML_NS)\r
-if(XML_UNICODE)\r
-    set(XML_UNICODE 1)\r
-else(XML_UNICODE)\r
-    set(XML_UNICODE 0)\r
-endif(XML_UNICODE)\r
-if(XML_UNICODE_WCHAR_T)\r
-    set(XML_UNICODE_WCHAR_T 1)\r
-else(XML_UNICODE_WCHAR_T)\r
-    set(XML_UNICODE_WCHAR_T 0)\r
-endif(XML_UNICODE_WCHAR_T)\r
-if(XML_ATTR_INFO)\r
-    set(XML_ATTR_INFO 1)\r
-else(XML_ATTR_INFO)\r
-    set(XML_ATTR_INFO 0)\r
-endif(XML_ATTR_INFO)\r
-\r
-if(XML_UNICODE_WCHAR_T AND NOT XML_UNICODE)\r
-    message(SEND_ERROR "Option XML_UNICODE_WCHAR_T=ON may not be used without XML_UNICODE=ON.")\r
-    set(XML_UNICODE 1)\r
-endif(XML_UNICODE_WCHAR_T AND NOT XML_UNICODE)\r
-\r
-if(BUILD_tools AND (XML_UNICODE AND NOT XML_UNICODE_WCHAR_T))\r
-    message(SEND_ERROR "The xmlwf tool can not be built with option XML_UNICODE_WCHAR_T=OFF and XML_UNICODE=ON. Either set XML_UNICODE_WCHAR_T=ON or BUILD_tools=OFF.")\r
-endif()\r
-\r
-if(BUILD_tests)\r
-    enable_testing()\r
-endif(BUILD_tests)\r
-\r
-\r
-include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)\r
-\r
-macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)\r
-    if(${use_ref} AND NOT (${use_ref} STREQUAL "AUTO") AND NOT ${have_ref})\r
-        message(SEND_ERROR\r
-                "Use of ${thing_lower} was enforced by ${use_ref}=ON but it could not be found.")\r
-    elseif(NOT ${use_ref} AND ${have_ref})\r
-        message("${thing_title} was found but it will not be used due to ${use_ref}=OFF.")\r
-        set(${have_ref} 0)\r
-    endif()\r
-endmacro()\r
-\r
-if(NOT WIN32)\r
-    evaluate_detection_results(USE_GETRANDOM HAVE_GETRANDOM "function getrandom" "Function getrandom")\r
-    evaluate_detection_results(USE_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")\r
-endif()\r
-\r
-configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")\r
-add_definitions(-DHAVE_EXPAT_CONFIG_H)\r
-\r
-\r
-set(EXTRA_COMPILE_FLAGS)\r
-if(FLAG_NO_STRICT_ALIASING)\r
-    set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")\r
-endif()\r
-if(FLAG_VISIBILITY)\r
-  add_definitions(-DXML_ENABLE_VISIBILITY=1)\r
-  set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")\r
-endif(FLAG_VISIBILITY)\r
-if (WARNINGS_AS_ERRORS)\r
-    if(MSVC)\r
-        add_definitions(/WX)\r
-    else(MSVC)\r
-        set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Werror")\r
-    endif(MSVC)\r
-endif(WARNINGS_AS_ERRORS)\r
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")\r
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")\r
-\r
-set(MSVC_USE_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")\r
-if (MSVC)\r
-    if (MSVC_USE_STATIC_CRT)\r
-        message("-- Using static CRT ${MSVC_USE_STATIC_CRT}")\r
-        foreach(flag_var\r
-                CMAKE_CXX_FLAGS_DEBUG\r
-                CMAKE_CXX_FLAGS_RELEASE\r
-                CMAKE_CXX_FLAGS_MINSIZEREL\r
-                CMAKE_CXX_FLAGS_RELWITHDEBINFO\r
-                CMAKE_C_FLAGS_DEBUG\r
-                CMAKE_C_FLAGS_RELEASE\r
-                CMAKE_C_FLAGS_MINSIZEREL\r
-                CMAKE_C_FLAGS_RELWITHDEBINFO\r
-                )\r
-            string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")\r
-        endforeach()\r
-    endif()\r
-endif()\r
-\r
-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)\r
-if(MSVC)\r
-    add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)\r
-endif(MSVC)\r
-if(WIN32)\r
-    set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")\r
-endif(WIN32)\r
-\r
-set(expat_SRCS\r
-    lib/xmlparse.c\r
-    lib/xmlrole.c\r
-    lib/xmltok.c\r
-    lib/xmltok_impl.c\r
-    lib/xmltok_ns.c\r
-)\r
-\r
-if(BUILD_shared)\r
-    set(_SHARED SHARED)\r
-    if(MSVC)\r
-        set(expat_SRCS ${expat_SRCS} lib/libexpat.def)\r
-    endif(MSVC)\r
-else(BUILD_shared)\r
-    set(_SHARED STATIC)\r
-    if(WIN32)\r
-        add_definitions(-DXML_STATIC)\r
-    endif(WIN32)\r
-endif(BUILD_shared)\r
-\r
-add_library(expat ${_SHARED} ${expat_SRCS})\r
-if(USE_libbsd)\r
-    target_link_libraries(expat ${LIB_BSD})\r
-endif()\r
-\r
-set(LIBCURRENT 7)   # sync\r
-set(LIBREVISION 9)  # with\r
-set(LIBAGE 6)       # configure.ac!\r
-math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")\r
-\r
-if(NOT WIN32)\r
-    set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})\r
-    set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})\r
-    set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})\r
-endif(NOT WIN32)\r
-\r
-macro(expat_install)\r
-    if(INSTALL)\r
-        install(${ARGN})\r
-    endif()\r
-endmacro()\r
-\r
-expat_install(TARGETS expat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}\r
-                      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}\r
-                      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})\r
-\r
-set(prefix ${CMAKE_INSTALL_PREFIX})\r
-set(exec_prefix "\${prefix}")\r
-set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")\r
-set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")\r
-configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY)\r
-\r
-expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})\r
-expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)\r
-\r
-if(BUILD_tools)\r
-    set(xmlwf_SRCS\r
-        xmlwf/xmlwf.c\r
-        xmlwf/xmlfile.c\r
-        xmlwf/codepage.c\r
-        xmlwf/readfilemap.c\r
-    )\r
-\r
-    add_executable(xmlwf ${xmlwf_SRCS})\r
-    set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)\r
-    target_link_libraries(xmlwf expat)\r
-    expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR})\r
-    if(BUILD_doc)\r
-        file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc)\r
-        add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1")\r
-        expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)\r
-     endif()\r
-endif()\r
-\r
-if(BUILD_examples)\r
-    add_executable(elements examples/elements.c)\r
-    set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)\r
-    target_link_libraries(elements expat)\r
-\r
-    add_executable(outline examples/outline.c)\r
-    set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)\r
-    target_link_libraries(outline expat)\r
-endif(BUILD_examples)\r
-\r
-if(BUILD_tests)\r
-    ## these are unittests that can be run on any platform\r
-    add_executable(runtests tests/runtests.c tests/chardata.c tests/structdata.c tests/minicheck.c tests/memcheck.c)\r
-    set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)\r
-    target_link_libraries(runtests expat)\r
-    add_test(runtests tests/runtests)\r
-\r
-    add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/structdata.c tests/minicheck.c tests/memcheck.c)\r
-    set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)\r
-    target_link_libraries(runtestspp expat)\r
-    add_test(runtestspp tests/runtestspp)\r
-endif(BUILD_tests)\r
+# This file is copyrighted under the BSD-license for buildsystem files of KDE
+# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>
+
+project(expat)
+
+cmake_minimum_required(VERSION 2.8.10)
+set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
+set(PACKAGE_NAME "expat")
+set(PACKAGE_VERSION "2.2.7")
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set(PACKAGE_TARNAME "${PACKAGE_NAME}")
+
+include(GNUInstallDirs)
+
+if(WINCE)
+    set(BUILD_tools_default OFF)
+else()
+    set(BUILD_tools_default ON)
+endif()
+if(MSVC OR NOT BUILD_tools_default)
+    set(BUILD_doc_default OFF)
+else()
+    find_program(DOCBOOK_TO_MAN NAMES docbook2x-man db2x_docbook2man docbook2man docbook-to-man)
+    if(DOCBOOK_TO_MAN)
+        set(BUILD_doc_default ON)
+    else()
+        set(BUILD_doc_default OFF)
+    endif()
+endif()
+
+option(BUILD_tools "build the xmlwf tool for expat library" ${BUILD_tools_default})
+option(BUILD_examples "build the examples for expat library" ON)
+option(BUILD_tests "build the tests for expat library" ON)
+option(BUILD_shared "build a shared expat library" ON)
+option(BUILD_doc "build man page for xmlwf" ${BUILD_doc_default})
+option(USE_libbsd "utilize libbsd (for arc4random_buf)" OFF)
+option(INSTALL "install expat files in cmake install target" ON)
+
+if(USE_libbsd)
+    find_library(LIB_BSD NAMES bsd)
+    if(NOT LIB_BSD)
+        message(FATAL_ERROR "USE_libbsd option is enabled, but libbsd was not found")
+    else()
+        set(HAVE_LIBBSD TRUE)
+    endif()
+endif()
+
+# configuration options
+set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
+option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
+option(XML_NS "Define to make XML Namespaces functionality available" ON)
+option(WARNINGS_AS_ERRORS "Treat all compiler warnings as errors" OFF)
+if(NOT WIN32)
+    option(XML_DEV_URANDOM "Define to include code reading entropy from `/dev/urandom'." ON)
+    if(XML_DEV_URANDOM)
+        set(XML_DEV_URANDOM 1)
+    else(XML_DEV_URANDOM)
+        set(XML_DEV_URANDOM 0)
+    endif(XML_DEV_URANDOM)
+endif()
+if (NOT WIN32)
+    set(USE_GETRANDOM "AUTO" CACHE STRING
+            "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")
+    set(USE_SYS_GETRANDOM "AUTO" CACHE STRING
+            "Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]")
+endif()
+option(XML_UNICODE "Use UTF-16 encoded chars (two bytes) instead of UTF-8" OFF)
+option(XML_UNICODE_WCHAR_T "Use wchar_t to represent UTF-16 instead of unsigned short" OFF)
+option(XML_ATTR_INFO "Define to allow retrieving the byte offsets for attribute names and values" OFF)
+
+if(XML_DTD)
+    set(XML_DTD 1)
+else(XML_DTD)
+    set(XML_DTD 0)
+endif(XML_DTD)
+if(XML_NS)
+    set(XML_NS 1)
+else(XML_NS)
+    set(XML_NS 0)
+endif(XML_NS)
+if(XML_UNICODE)
+    set(XML_UNICODE 1)
+else(XML_UNICODE)
+    set(XML_UNICODE 0)
+endif(XML_UNICODE)
+if(XML_UNICODE_WCHAR_T)
+    set(XML_UNICODE_WCHAR_T 1)
+else(XML_UNICODE_WCHAR_T)
+    set(XML_UNICODE_WCHAR_T 0)
+endif(XML_UNICODE_WCHAR_T)
+if(XML_ATTR_INFO)
+    set(XML_ATTR_INFO 1)
+else(XML_ATTR_INFO)
+    set(XML_ATTR_INFO 0)
+endif(XML_ATTR_INFO)
+
+if(XML_UNICODE_WCHAR_T AND NOT XML_UNICODE)
+    message(SEND_ERROR "Option XML_UNICODE_WCHAR_T=ON may not be used without XML_UNICODE=ON.")
+    set(XML_UNICODE 1)
+endif(XML_UNICODE_WCHAR_T AND NOT XML_UNICODE)
+
+if(BUILD_tools AND (XML_UNICODE AND NOT XML_UNICODE_WCHAR_T))
+    message(SEND_ERROR "The xmlwf tool can not be built with option XML_UNICODE_WCHAR_T=OFF and XML_UNICODE=ON. Either set XML_UNICODE_WCHAR_T=ON or BUILD_tools=OFF.")
+endif()
+
+if(BUILD_tests)
+    enable_testing()
+endif(BUILD_tests)
+
+
+include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
+
+macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
+    if(${use_ref} AND NOT (${use_ref} STREQUAL "AUTO") AND NOT ${have_ref})
+        message(SEND_ERROR
+                "Use of ${thing_lower} was enforced by ${use_ref}=ON but it could not be found.")
+    elseif(NOT ${use_ref} AND ${have_ref})
+        message("${thing_title} was found but it will not be used due to ${use_ref}=OFF.")
+        set(${have_ref} 0)
+    endif()
+endmacro()
+
+if(NOT WIN32)
+    evaluate_detection_results(USE_GETRANDOM HAVE_GETRANDOM "function getrandom" "Function getrandom")
+    evaluate_detection_results(USE_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")
+endif()
+
+configure_file(expat_config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_config.h")
+add_definitions(-DHAVE_EXPAT_CONFIG_H)
+
+
+set(EXTRA_COMPILE_FLAGS)
+if(FLAG_NO_STRICT_ALIASING)
+    set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fno-strict-aliasing")
+endif()
+if(FLAG_VISIBILITY)
+  add_definitions(-DXML_ENABLE_VISIBILITY=1)
+  set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden")
+endif(FLAG_VISIBILITY)
+if (WARNINGS_AS_ERRORS)
+    if(MSVC)
+        add_definitions(/WX)
+    else(MSVC)
+        set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Werror")
+    endif(MSVC)
+endif(WARNINGS_AS_ERRORS)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_COMPILE_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_COMPILE_FLAGS}")
+
+set(MSVC_USE_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
+if (MSVC)
+    if (MSVC_USE_STATIC_CRT)
+        message("-- Using static CRT ${MSVC_USE_STATIC_CRT}")
+        foreach(flag_var
+                CMAKE_CXX_FLAGS_DEBUG
+                CMAKE_CXX_FLAGS_RELEASE
+                CMAKE_CXX_FLAGS_MINSIZEREL
+                CMAKE_CXX_FLAGS_RELWITHDEBINFO
+                CMAKE_C_FLAGS_DEBUG
+                CMAKE_C_FLAGS_RELEASE
+                CMAKE_C_FLAGS_MINSIZEREL
+                CMAKE_C_FLAGS_RELWITHDEBINFO
+                )
+            string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+        endforeach()
+    endif()
+endif()
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib)
+if(MSVC)
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
+endif(MSVC)
+if(WIN32)
+    set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")
+endif(WIN32)
+
+set(expat_SRCS
+    lib/xmlparse.c
+    lib/xmlrole.c
+    lib/xmltok.c
+    lib/xmltok_impl.c
+    lib/xmltok_ns.c
+)
+
+if(BUILD_shared)
+    set(_SHARED SHARED)
+    if(MSVC)
+        set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
+    endif(MSVC)
+else(BUILD_shared)
+    set(_SHARED STATIC)
+    if(WIN32)
+        add_definitions(-DXML_STATIC)
+    endif(WIN32)
+endif(BUILD_shared)
+
+add_library(expat ${_SHARED} ${expat_SRCS})
+if(USE_libbsd)
+    target_link_libraries(expat ${LIB_BSD})
+endif()
+
+set(LIBCURRENT 7)   # sync
+set(LIBREVISION 9)  # with
+set(LIBAGE 6)       # configure.ac!
+math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")
+
+if(NOT WIN32)
+    set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})
+    set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})
+    set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})
+endif(NOT WIN32)
+
+macro(expat_install)
+    if(INSTALL)
+        install(${ARGN})
+    endif()
+endmacro()
+
+expat_install(TARGETS expat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+                      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+                      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix "\${prefix}")
+set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
+configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY)
+
+expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+if(BUILD_tools)
+    set(xmlwf_SRCS
+        xmlwf/xmlwf.c
+        xmlwf/xmlfile.c
+        xmlwf/codepage.c
+        xmlwf/readfilemap.c
+    )
+
+    add_executable(xmlwf ${xmlwf_SRCS})
+    set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
+    target_link_libraries(xmlwf expat)
+    expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR})
+    if(BUILD_doc)
+        file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc)
+        add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1")
+        expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+     endif()
+endif()
+
+if(BUILD_examples)
+    add_executable(elements examples/elements.c)
+    set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
+    target_link_libraries(elements expat)
+
+    add_executable(outline examples/outline.c)
+    set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
+    target_link_libraries(outline expat)
+endif(BUILD_examples)
+
+if(BUILD_tests)
+    ## these are unittests that can be run on any platform
+    add_executable(runtests tests/runtests.c tests/chardata.c tests/structdata.c tests/minicheck.c tests/memcheck.c)
+    set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
+    target_link_libraries(runtests expat)
+    add_test(runtests tests/runtests)
+
+    add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/structdata.c tests/minicheck.c tests/memcheck.c)
+    set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
+    target_link_libraries(runtestspp expat)
+    add_test(runtestspp tests/runtestspp)
+endif(BUILD_tests)
index ca1f4026f000ebfe28a839f0c9298b79edfa669c..c7cd0de2f99dc5180e0a1ddc60dd1ffbd02e8abb 100644 (file)
@@ -22,6 +22,7 @@ Release x.x.x xxx xxx xx xxxx
                     -DUSE_GETRANDOM=(ON|OFF|AUTO)
                     -DUSE_SYS_GETRANDOM=(ON|OFF|AUTO)
             #265  CMake: Fix linking with MinGW
+                  CMake: Migrate files from Windows to Unix line endings
        #299 #302  Windows: Replace LoadLibrary hack to access
                     unofficial API function SystemFunction036 (RtlGenRandom)
                     by using official API function rand_s (needs WinXP+)
index 0803c7b21ab9598c4792115c03b873cf3e4e947f..4936f67f1e876d1cb12f3244743049cf0167d953 100644 (file)
@@ -1,66 +1,66 @@
-include(CheckCCompilerFlag)\r
-include(CheckCSourceCompiles)\r
-include(CheckIncludeFile)\r
-include(CheckIncludeFiles)\r
-include(CheckSymbolExists)\r
-include(TestBigEndian)\r
-\r
-check_include_file("dlfcn.h" HAVE_DLFCN_H)\r
-check_include_file("fcntl.h" HAVE_FCNTL_H)\r
-check_include_file("inttypes.h" HAVE_INTTYPES_H)\r
-check_include_file("memory.h" HAVE_MEMORY_H)\r
-check_include_file("stdint.h" HAVE_STDINT_H)\r
-check_include_file("stdlib.h" HAVE_STDLIB_H)\r
-check_include_file("strings.h" HAVE_STRINGS_H)\r
-check_include_file("string.h" HAVE_STRING_H)\r
-check_include_file("sys/stat.h" HAVE_SYS_STAT_H)\r
-check_include_file("sys/types.h" HAVE_SYS_TYPES_H)\r
-check_include_file("unistd.h" HAVE_UNISTD_H)\r
-\r
-check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)\r
-check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)\r
-check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)\r
-\r
-if(USE_libbsd)\r
-    set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")\r
-    set(_bsd "bsd/")\r
-else()\r
-    set(_bsd "")\r
-endif()\r
-check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)\r
-if(NOT HAVE_ARC4RANDOM_BUF)\r
-    check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)\r
-endif()\r
-set(CMAKE_REQUIRED_LIBRARIES)\r
-\r
-#/* Define to 1 if you have the ANSI C header files. */\r
-check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)\r
-\r
-test_big_endian(WORDS_BIGENDIAN)\r
-#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */\r
-if(WORDS_BIGENDIAN)\r
-    set(BYTEORDER 4321)\r
-else(WORDS_BIGENDIAN)\r
-    set(BYTEORDER 1234)\r
-endif(WORDS_BIGENDIAN)\r
-\r
-if(HAVE_SYS_TYPES_H)\r
-    check_symbol_exists("off_t" "sys/types.h" OFF_T)\r
-    check_symbol_exists("size_t" "sys/types.h" SIZE_T)\r
-else(HAVE_SYS_TYPES_H)\r
-    set(OFF_T "long")\r
-    set(SIZE_T "unsigned")\r
-endif(HAVE_SYS_TYPES_H)\r
-\r
-check_c_source_compiles("\r
-        #include <stdlib.h>  /* for NULL */\r
-        #include <unistd.h>  /* for syscall */\r
-        #include <sys/syscall.h>  /* for SYS_getrandom */\r
-        int main() {\r
-            syscall(SYS_getrandom, NULL, 0, 0);\r
-            return 0;\r
-        }"\r
-    HAVE_SYSCALL_GETRANDOM)\r
-\r
-check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)\r
-check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)\r
+include(CheckCCompilerFlag)
+include(CheckCSourceCompiles)
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckSymbolExists)
+include(TestBigEndian)
+
+check_include_file("dlfcn.h" HAVE_DLFCN_H)
+check_include_file("fcntl.h" HAVE_FCNTL_H)
+check_include_file("inttypes.h" HAVE_INTTYPES_H)
+check_include_file("memory.h" HAVE_MEMORY_H)
+check_include_file("stdint.h" HAVE_STDINT_H)
+check_include_file("stdlib.h" HAVE_STDLIB_H)
+check_include_file("strings.h" HAVE_STRINGS_H)
+check_include_file("string.h" HAVE_STRING_H)
+check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
+check_include_file("unistd.h" HAVE_UNISTD_H)
+
+check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
+check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
+check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
+
+if(USE_libbsd)
+    set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
+    set(_bsd "bsd/")
+else()
+    set(_bsd "")
+endif()
+check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)
+if(NOT HAVE_ARC4RANDOM_BUF)
+    check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)
+endif()
+set(CMAKE_REQUIRED_LIBRARIES)
+
+#/* Define to 1 if you have the ANSI C header files. */
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
+
+test_big_endian(WORDS_BIGENDIAN)
+#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+if(WORDS_BIGENDIAN)
+    set(BYTEORDER 4321)
+else(WORDS_BIGENDIAN)
+    set(BYTEORDER 1234)
+endif(WORDS_BIGENDIAN)
+
+if(HAVE_SYS_TYPES_H)
+    check_symbol_exists("off_t" "sys/types.h" OFF_T)
+    check_symbol_exists("size_t" "sys/types.h" SIZE_T)
+else(HAVE_SYS_TYPES_H)
+    set(OFF_T "long")
+    set(SIZE_T "unsigned")
+endif(HAVE_SYS_TYPES_H)
+
+check_c_source_compiles("
+        #include <stdlib.h>  /* for NULL */
+        #include <unistd.h>  /* for syscall */
+        #include <sys/syscall.h>  /* for SYS_getrandom */
+        int main() {
+            syscall(SYS_getrandom, NULL, 0, 0);
+            return 0;
+        }"
+    HAVE_SYSCALL_GETRANDOM)
+
+check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING)
+check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY)
index 39e3f21d0a095901a1cfcc36bd553b82e51a846d..f92d4c9496f578bea96c2b59e59fd0ef69655e9a 100644 (file)
-/* expat_config.h.cmake.  Based upon generated expat_config.h.in.  */\r
-\r
-/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */\r
-#cmakedefine BYTEORDER @BYTEORDER@\r
-\r
-/* Define to 1 if you have the `arc4random' function. */\r
-#cmakedefine HAVE_ARC4RANDOM\r
-\r
-/* Define to 1 if you have the `arc4random_buf' function. */\r
-#cmakedefine HAVE_ARC4RANDOM_BUF\r
-\r
-/* Define to 1 if you have the <dlfcn.h> header file. */\r
-#cmakedefine HAVE_DLFCN_H\r
-\r
-/* Define to 1 if you have the <fcntl.h> header file. */\r
-#cmakedefine HAVE_FCNTL_H\r
-\r
-/* Define to 1 if you have the `getpagesize' function. */\r
-#cmakedefine HAVE_GETPAGESIZE\r
-\r
-/* Define to 1 if you have the `getrandom' function. */\r
-#cmakedefine HAVE_GETRANDOM\r
-\r
-/* Define to 1 if you have the <inttypes.h> header file. */\r
-#cmakedefine HAVE_INTTYPES_H\r
-\r
-/* Define to 1 if you have the `bsd' library (-lbsd). */\r
-#cmakedefine HAVE_LIBBSD\r
-\r
-/* Define to 1 if you have the <memory.h> header file. */\r
-#cmakedefine HAVE_MEMORY_H\r
-\r
-/* Define to 1 if you have a working `mmap' system call. */\r
-#cmakedefine HAVE_MMAP\r
-\r
-/* Define to 1 if you have the <stdint.h> header file. */\r
-#cmakedefine HAVE_STDINT_H\r
-\r
-/* Define to 1 if you have the <stdlib.h> header file. */\r
-#cmakedefine HAVE_STDLIB_H\r
-\r
-/* Define to 1 if you have the <strings.h> header file. */\r
-#cmakedefine HAVE_STRINGS_H\r
-\r
-/* Define to 1 if you have the <string.h> header file. */\r
-#cmakedefine HAVE_STRING_H\r
-\r
-/* Define to 1 if you have `syscall' and `SYS_getrandom'. */\r
-#cmakedefine HAVE_SYSCALL_GETRANDOM\r
-\r
-/* Define to 1 if you have the <sys/stat.h> header file. */\r
-#cmakedefine HAVE_SYS_STAT_H\r
-\r
-/* Define to 1 if you have the <sys/types.h> header file. */\r
-#cmakedefine HAVE_SYS_TYPES_H\r
-\r
-/* Define to 1 if you have the <unistd.h> header file. */\r
-#cmakedefine HAVE_UNISTD_H\r
-\r
-/* Define to the address where bug reports for this package should be sent. */\r
-#cmakedefine PACKAGE_BUGREPORT\r
-\r
-/* Define to the full name of this package. */\r
-#cmakedefine PACKAGE_NAME\r
-\r
-/* Define to the full name and version of this package. */\r
-#cmakedefine PACKAGE_STRING\r
-\r
-/* Define to the one symbol short name of this package. */\r
-#cmakedefine PACKAGE_TARNAME\r
-\r
-/* Define to the version of this package. */\r
-#cmakedefine PACKAGE_VERSION\r
-\r
-/* Define to 1 if you have the ANSI C header files. */\r
-#cmakedefine STDC_HEADERS\r
-\r
-/* whether byteorder is bigendian */\r
-#cmakedefine WORDS_BIGENDIAN\r
-\r
-/* Define to specify how much context to retain around the current parse\r
-   point. */\r
-#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@\r
-\r
-/* Define to make parameter entity parsing functionality available. */\r
-#cmakedefine XML_DTD\r
-\r
-/* Define to make XML Namespaces functionality available. */\r
-#cmakedefine XML_NS\r
-\r
-#if ! defined(_WIN32)\r
-/* Define to extract entropy from /dev/urandom. */\r
-  #cmakedefine XML_DEV_URANDOM\r
-#endif\r
-\r
-/* Define to use UTF-16 chars (two bytes). */\r
-#cmakedefine XML_UNICODE\r
-\r
-/* Define to use wchar_t as UTF-16 char type instead of unsigned short. */\r
-#cmakedefine XML_UNICODE_WCHAR_T\r
-\r
-/* Define to allow retrieving the byte offsets for attribute names and values.\r
- */\r
-#cmakedefine XML_ATTR_INFO\r
-\r
-/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */\r
-#ifdef _MSC_VER\r
-#  define __func__ __FUNCTION__\r
-#endif\r
-\r
-/* Define to `long' if <sys/types.h> does not define. */\r
-#cmakedefine off_t @OFF_T@\r
-\r
-/* Define to `unsigned' if <sys/types.h> does not define. */\r
-#cmakedefine size_t @SIZE_T@\r
+/* expat_config.h.cmake.  Based upon generated expat_config.h.in.  */
+
+/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+#cmakedefine BYTEORDER @BYTEORDER@
+
+/* Define to 1 if you have the `arc4random' function. */
+#cmakedefine HAVE_ARC4RANDOM
+
+/* Define to 1 if you have the `arc4random_buf' function. */
+#cmakedefine HAVE_ARC4RANDOM_BUF
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine HAVE_FCNTL_H
+
+/* Define to 1 if you have the `getpagesize' function. */
+#cmakedefine HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getrandom' function. */
+#cmakedefine HAVE_GETRANDOM
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+#cmakedefine HAVE_LIBBSD
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#cmakedefine HAVE_MMAP
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H
+
+/* Define to 1 if you have `syscall' and `SYS_getrandom'. */
+#cmakedefine HAVE_SYSCALL_GETRANDOM
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS
+
+/* whether byteorder is bigendian */
+#cmakedefine WORDS_BIGENDIAN
+
+/* Define to specify how much context to retain around the current parse
+   point. */
+#cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@
+
+/* Define to make parameter entity parsing functionality available. */
+#cmakedefine XML_DTD
+
+/* Define to make XML Namespaces functionality available. */
+#cmakedefine XML_NS
+
+#if ! defined(_WIN32)
+/* Define to extract entropy from /dev/urandom. */
+  #cmakedefine XML_DEV_URANDOM
+#endif
+
+/* Define to use UTF-16 chars (two bytes). */
+#cmakedefine XML_UNICODE
+
+/* Define to use wchar_t as UTF-16 char type instead of unsigned short. */
+#cmakedefine XML_UNICODE_WCHAR_T
+
+/* Define to allow retrieving the byte offsets for attribute names and values.
+ */
+#cmakedefine XML_ATTR_INFO
+
+/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
+#ifdef _MSC_VER
+#  define __func__ __FUNCTION__
+#endif
+
+/* Define to `long' if <sys/types.h> does not define. */
+#cmakedefine off_t @OFF_T@
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#cmakedefine size_t @SIZE_T@