]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Not experimental anymore
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 24 Jun 2024 17:14:43 +0000 (20:14 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 26 Jun 2024 12:48:56 +0000 (15:48 +0300)
While the CMake support has gotten a lot less testing than
the Autotools-based build, the supported features should now
be equal. The output may differ slightly, for example,
liblzma.pc may have

    Libs.private: -pthread -lpthread

with Autotools on GNU/Linux. CMake doesn't put any options
in Libs.private because on modern glibc the pthread functions
are in libc. The options options aren't required to link static
liblzma into an application.

Autotools-based build doesn't generate or install
lib/cmake/liblzma-*.cmake files. This means that on most
platforms one cannot rely on

    find_package(liblzma 5.2.5 REQUIRED CONFIG)

or such finding those files.

CMakeLists.txt

index 1fe29febc9b6e68b8c4c913cb43bdae1ea0e2c06..5fd5c341ae2c0dbb1ee7df7d247cbe5ee8cc59ae 100644 (file)
@@ -4,9 +4,12 @@
 #
 # CMake support for building XZ Utils
 #
-# The complete CMake-based build hasn't been tested much yet and
-# thus it's still slightly experimental. Testing this especially
-# outside GNU/Linux and Windows would be great now.
+# CMake 3.20 or later is recommended. Older versions down to 3.14 work
+# too with the following limitations:
+#
+#   - Translations aren't supported.
+#
+#   - Generated liblzma.pc won't be relocatable.
 #
 # About CMAKE_BUILD_TYPE:
 #