Musl 1.2.4 made the LFS64 interfaces only available when
_LARGEFILE64_SOURCE is defined, and they will be removed altogether in
Musl 1.2.5. This commit replaces the LFS64 calls with their non-LFS64
versions and defines _FILE_OFFSET_BITS=64, which makes all interfaces
64-bit.
Bug: https://bugs.gentoo.org/905999
Previously in the locally (cmake build dir) exported cmake script,
there was no namespace, so the targets would directly be available
in the global namespace. Users would do something like:
include(cmake/tinyxml2Targets.cmake)
target_link_libraries(main tinyxml2)
Now, a namespace is used (just like the cmake export that is exported
to the system at the `install(EXPORT...)` command at the bottom of this
file. Uses will now look like:
include(cmake/tinyxml2Targets.cmake)
target_link_libraries(main tinyxml2::tinyxml2)
This is technically a minor breaking change. It will only affect users
that actually use the *locally* export cmake targets script, which I
expect to be fairly few (note that this is different from the system
exported script). Also, it will only affect users that freshly
build at this commit of tinyxml2, and have the cmake for their
downstream project configured to load it. That cmake will need to be
changed from the first snippet to the second snippet above.
CMakeLists.txt uses set(CMAKE_DEBUG_POSTFIX "d") to distinguish
between debug and release lib. Use this postfix also in the
generated tinyxml2.pc file in case of a CMake Debug build.
This results in the following contents of tinyxml2.pc
- Release:
Libs: -L${libdir} -ltinyxml2
- Debug:
Libs: -L${libdir} -ltinyxml2d
The `export()` command purely exports a cmake script into the build
directory; it is not related to find_package at all. It is technically
not necessary. The main use case would be a user copying it into their
internal cmake/ dir in their project, and then using `include()`'ing
that file in their cmake.
The `install(EXPORT...` command is what actually generates a cmake
module that is put on the filesystem in a location that can be found by
`find_package` when in config mode.
Forcing CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR to be absolute is unnecessary and results in absolute paths in the installation. This prevents relocatable prefix installations.