aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-03-22Relative and absolute paths for a relocatable pkgconf fileMiloš Komarčević1-0/+11
2023-10-12Added cmake option to disable install rulesIlya Lavrenov1-39/+43
2023-10-06Remove BUILD_TESTING as prerequisite for the PUGIXML_BUILD_TESTS; it was ↵Richard Peters1-1/+1
always set by including CTest, now CTest is conditionally included later on
2023-10-06Only include CTest when building the pugixml testsRichard Peters1-1/+1
2023-09-07Update version to 1.14 everywherev1.14latestArseny Kapoulkine1-1/+1
2023-07-19{cmake} Fix deprecation warning by updating min version to 3.5Andy Maloney1-1/+1
With CMake 3.27, we get a deprecation warning: "Compatibility with CMake < 3.5 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions." Bump min version to 3.5 to remove warning.
2023-04-21build: Fix CMake PUGIXML_STATIC_CRT behaviorArseny Kapoulkine1-5/+6
Implementation of PUGIXML_STATIC_CRT for newer CMake versions (3.15+) depend on MSVC_RUNTIME_LIBRARY, but this only works if the policy is defined *before* the project.
2022-10-20Update version number in preparation for 1.13Arseny Kapoulkine1-1/+1
2022-10-20Fix exported symbols under clang-cl (Closes #503)Izzy Muerte1-2/+5
This also turns the define for PUGIXML_API into an `$<IF:>`, instead of an `$<IF:>` with an empty true condition. If this is inadequate, I will undo it, and place them on separate lines as they were before, but will most likely use an inverse `$<NOT:>` instead of an `$<IF:>`.
2022-09-25Correctly set default visibility on non-windows compilersMilian Wolff1-1/+3
This fixes compilation of pugixml with -fvisibility=hidden. Without this patch, one would get lots of unresolved symbols when consuming pugixml as a shared library.
2022-02-08Update version to 1.12Arseny Kapoulkine1-2/+2
2021-08-07Set CMP0091 CMake policyArseny Kapoulkine1-0/+5
This allows the correct use of runtime library override. Fixes #412
2021-08-07Update CMakeLists.txtArseny Kapoulkine1-15/+2
Remove memory configuration options and rely on automatic detection of long long
2021-06-28Store definitions in variable to avoid duplicationBjörn Blissing1-20/+18
Store compile definitions in variable to avoid duplicated generator expressions.
2021-06-28Make some compile definitions publicBjörn Blissing1-3/+5
Moved needed defines to public section of target_compile_definitions.
2021-06-28Fix generator expressionsBjörn Blissing1-20/+20
2021-06-28Move advanced memory settings into target defs.Björn Blissing1-25/+13
Moved the advanced memory options into target_compile_definitions using generator expressions.
2021-06-28Check for existence of long longBjörn Blissing1-0/+4
2021-06-28Add options to build targetsBjörn Blissing1-25/+16
Add custom options to the build targets via generator expressions.
2021-06-28Mark advanced options and removed redundant onesBjörn Blissing1-25/+3
Options marked as advanced are hidden by default in the CMake GUI. The `PUGIXML_HEADER_ONLY` are redundant when during CMake builds, hence removed. The `PUGIXML_HAS_LONG_LONG` should be handled automatically and needs to be rewritten, hence these options has been removed.
2021-06-28Add Cmake options for pugiconfig.hppBjörn Blissing1-0/+70
Add Cmake options variables for each of the defines in pugiconfig.hpp.
2021-06-19Reverted to use of global BUILD_SHARED_LIBS optionBjörn Blissing1-9/+10
This commit reverts back to exposing the global variable BUILD_SHARED_LIBS. Since building static libraries are the default for CMake (i.e. BUILD_SHARED_LIBS=OFF) the option to build both static and shared libraries were moved into a conditional option. So the option PUGIXML_BUILD_SHARED_AND_STATIC is now only visible when the global BUILD_SHARED_LIBS variable is set to ON. The change also prevents the case were the user first enables BUILD_SHARED_LIBS and then enables PUGIXML_BUILD_SHARED_AND_STATIC to then again disable BUILD_SHARED_LIBS.
2021-06-19Use target_compile_definitions for custom definesBjörn Blissing1-7/+7
Replace `add_definitions` with `target_compile_definitions` for specified targets. Multiple options are separated using the `separate_arguments` function, which converts any string using space-separated arguments into a semicolon-separated list.
2021-06-15Re-introduced the custom build definesBjörn Blissing1-0/+9
The ability to use custom build defines were removed in commit: 1c5a0bb32583fd294022e68e66b541bf6ff71a67 This commit will reintroduce this feature, but using a prefixed variable name.
2021-06-15Add PUGIXML as prefix to CMake optionsBjörn Blissing1-17/+18
Added PUGIXML as prefix to all CMake options to avoid naming collisions with downstream projects. Removed the cached variable BUILD_DEFINES, since it was unused.
2020-11-25Update version to 1.11 and update documentationArseny Kapoulkine1-1/+1
2020-07-15Fix debug postfix in pkgconfig fileWolfgang Stöggl1-0/+10
In case of USE_POSTFIX, the POSTFIX is dependent on the CMAKE_BUILD_TYPE. Use the correct POSTFIX also in the generated pugixml.pc file. This results in the following contents of pugixml.pc: - Release: Libs: -L${libdir} -lpugixml - RelWithDebInfo Libs: -L${libdir} -lpugixml_r - MinSizeRel: Libs: -L${libdir} -lpugixml_m - Debug: Libs: -L${libdir} -lpugixml_d
2020-07-06[Cmake] Static build should not export APIsJulian Xhokaxhiu1-3/+0
Fixes #359
2020-04-27Export targets from build directoryKyle Edwards1-0/+3
This will allow projects to use pugixml from its build directory rather than having to install it.
2020-04-27Use COMPONENT arguments in install() commandsKyle Edwards1-7/+23
2020-04-27Fix multiple-rules-for-target errorKyle Edwards1-71/+57
The old logic for BUILD_SHARED_LIBS and BUILD_SHARED_AND_STATIC_LIBS would produce two targets with the same name and different build rules. The Makefile generator tolerated this, but the Ninja generator raised an error. Fix the logic so that only one shared and one static target gets built, and make the pugixml target an ALIAS of the one dictated by BUILD_SHARED_LIBS.
2020-02-07Update CMakeLists.txt to rename the static and shared libraries to pugixmlGianfranco Costamagna1-1/+2
Don't call them pugixml-shared or pugixml-static, because this breaks pkgconfig calls and userspace tools.
2019-12-06Add POSITION_INDEPENDENT_CODE option Arnaud Botella1-0/+1
Allow to use the static library in other dynamic librairies. This is a standard cmake option https://cmake.org/cmake/help/v3.11/prop_tgt/POSITION_INDEPENDENT_CODE.html#prop_tgt:POSITION_INDEPENDENT_CODE
2019-10-17:bug: Fix incorrect installation location for exported CMake targetsIsabella Muerte1-2/+2
2019-10-06:bug: Fix install locations for pkgconfig *and* cmakeIsabella Muerte1-2/+2
2019-10-06:fire: Remove commented out CMake codeIsabella Muerte1-16/+0
2019-10-01Adjust MSVC runtime settings as requested.Isabella Muerte1-20/+22
The block of code can be removed in the future if CMake 3.15 ever becomes the minimum
2019-09-30Update `check` command to output text on failureIsabella Muerte1-2/+3
Move pugixml-config.cmake.in to scripts/ to prevent polluting the root
2019-09-28:sparkles: Update CMake to modern approachIsabella Muerte1-73/+171
New Features: pugixml-shared and pugixml-static are "always" available, but not always built. This allows downstream projects to still use them, and to make sure our configurations are correct regardless of if they are being built. They are not always installed however. pugixml-shared and pugixml-static have ALIAS libraries of pugixml::shared and pugixml::static respectively. These names are also respected in the `find_package(pugixml CONFIG)` generated files, so its safe to use pugixml in a CMake project regardless of whether it is installed locally, or if its a subproject via `add_subdirectory`. pugixml will automatically select the correct library type based on BUILD_SHARED_LIBS. A pugixml::pugixml ALIAS is also available. CMAKE_MSVC_RUNTIME_LIBRARY from CMake 3.15 has been backported. CMake will now rely on generator expressions (a powerful abstraction in large projects with many subdirectories) for most work. This offloads work from the single-threaded configure stage to the multithreaded generation stage. pugixml now uses CTest as the runner. Some settings are automatically disabled if pugixml is used as a subdirectory. These are still able to be manually set, but are hidden from folks who choose to use CMake GUI.
2019-09-28:construction: Begin moving pugixml to modern(ish) CMakeIsabella Muerte1-20/+29
:arrow_up: Bump CMake minimum to 3.4 :bug: pugixml no longer requires a C compiler to be found or set to compile correctly. This speeds up configuration and building on windows. :construction: Begin laying groundwork to backport MSVC_RUNTIME_LIBRARY property
2019-09-21Move pugixml.rc to scripts/Arseny Kapoulkine1-1/+2
This keeps src/ folder clean of auxiliary files only required for special builds; note that CMakeLists.txt already depends on scripts/ (specifically for pkgconfig setup).
2019-09-19Add: Windows DLL version info header (#298)lady mesh1-2/+5
Closes #294
2019-09-11Update version to 1.10Arseny Kapoulkine1-1/+1
Note: this chang also updates PUGIXML_VERSION macro to allow for double-digit minor versions; this preserves the continuity of versions so PUGIXML_VERSION >= 190 will still work.
2019-08-04fix cmake option USE_POSTFIX (#283)Matan Nassau1-1/+1
appending the suffix to the build product need not be a function of whether CMAKE_CONFIGURATION_TYPES is set. for example, having two ninja build trees---one for debug and another for release---is a fine use-case for USE_POSTFIX.
2019-07-25fix running tests (#280)Artur Leonov1-1/+1
2019-02-06Refactor CMakeLists.txt support for multiple targetsArseny Kapoulkine1-57/+29
We now have a ${LIBRARY} variable that we can either use directly or in a foreach loop to be able to process either pugixml or pugixml-static and pugixml-shared targets. Also fixes incorrect shared library assignment when BUILD_SHARED_AND_STATIC_LIBS is defined, and only links the static library in for make check.
2019-02-06make pugixml build static and shared via cmake (#257)basti1711-14/+65
2018-12-10pkg-config: Use CMake GnuInstallDirs FULL varsMillian Poquet1-1/+1
Fixes an installation problem in Nix packages, as non-FULL variables are already absolute paths in this case.
2018-08-13Minor CMakeLists.txt cleanupArseny Kapoulkine1-1/+1
Instead of hardcoding SOVERSION, use CMake variables to set it up. Closes #220.
2018-06-26Use CMAKE_INSTALL_LIBDIR for pugixml.pc (#215)Wolfgang Stöggl1-1/+1
- Up to now, the libdir was hardcoded to "lib" inside pugixml.pc and the install directory of pugixml.pc was "lib/pkgconfig" - Adds support for lib and lib64 by using CMAKE_INSTALL_LIBDIR variable