From 9f2e2ade23262842489bc4f9840e2c32caa2127c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2025 19:23:21 +0100 Subject: [PATCH 1/3] Improve README formatting Use Markdown sections instead of separator lines left over from plain text format. --- README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9da8be31..ad8695d6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -0. Introduction ---------------- +## 0. Introduction xmlwrapp is a modern style C++ library for working with XML data, built atop the venerable libxml2 C library. @@ -15,20 +14,18 @@ group hosted at [Google Groups](https://groups.google.com/group/xmlwrapp) or email directly to xmlwrapp@googlegroups.com. -1. Requirements ---------------- +## 1. Requirements In order to build xmlwrapp, you need libxml2 version 2.4.28 or newer. When building with XSLT support, libxslt 1.1.6 or newer is required. Both libraries are available from [libxml2 home page](https://xmlsoft.org). -2. Building on Unix -------------------- +## 2. Building on Unix On Unix, either autotools-based build system or CMake can be used. -## Building using Autotools +### Building using Autotools Building xmlwrapp is usually as simple as running the following three commands: @@ -48,7 +45,7 @@ release archives, `configure` script won't exist and you will need to run to create it and other build files. -## Building using CMake +### Building using CMake Building xmlwrapp using CMake is also straightforward. Just do the following: @@ -61,8 +58,7 @@ shared (default) or static libraries should be built, use `cmake -L` to see the other available options. -3. Building on Windows ----------------------- +## 3. Building on Windows The library can be built either with Microsoft Visual C++ compiler, using the project files from located in platform/Win32 directory or in the same way as @@ -73,8 +69,7 @@ either build libxml and libxslt for Windows yourself or download the already built versions from http://www.zlatkovic.com/libxml.en.html or elsewhere. -4. Using xmlwrapp ------------------ +## Using xmlwrapp On Unix, you should use pkg-config to get compiler flags for xmlwrapp or xsltwrapp libraries: From 5ad99424ff83925c6d09c3b576ce54a6feb374de Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2025 19:23:40 +0100 Subject: [PATCH 2/3] Mention using the library via CMake in README This is probably more useful than manual instructions. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ad8695d6..9ac70a3a 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,7 @@ xsltwrapp libraries: On Windows, you need to link against xmlwrapp libraries and add the include/ directory to compiler's headers search path. + +Under either platform you may consume the library using CMake in the usual way, +i.e. using either `find_package(xmlwrapp)` or `add_subdirectory(xmlwrapp)` and +then linking to the `xmlwrapp::xmlwrapp` target. From d6b39f50c112606d13490f309b398be1092d3f42 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Dec 2025 19:25:24 +0100 Subject: [PATCH 3/3] Require CMake 3.21 or greater 3.20 has a nasty bug with cache variables overriding the value of normal ones (see CMake policy 0126) and 3.21 is almost 5 years old by now and present in all common Linux distributions. Also specify the maximum version tested. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f32b284..a8474a9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ -# 3.20 is required due to the of configure_file(FILE_PERMISSIONS). -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.21..4.1) # Extract version from the header which is the source of truth for it. file(READ "${CMAKE_CURRENT_SOURCE_DIR}/include/xmlwrapp/version.h" VERSION_H_CONTENT)