]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Add XZ_TOOL_XZDEC and XZ_TOOL_LZMADEC
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 15 Jun 2024 15:07:04 +0000 (18:07 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 20 Jun 2024 18:53:07 +0000 (21:53 +0300)
CMakeLists.txt

index e3592412ad22467298b3f68a9c0f08dfa02af289..59bb6c3b2f97a1bdf2e05c7e9ac2fbbaf300f1bf 100644 (file)
@@ -1705,8 +1705,21 @@ endif()
 # xzdec and lzmadec
 #############################################################################
 
+option(XZ_TOOL_XZDEC "Build and install the xzdec command line tool" ON)
+option(XZ_TOOL_LZMADEC "Build and install the lzmadec command line tool" ON)
+
 if(HAVE_DECODERS)
-    foreach(XZDEC xzdec lzmadec)
+    set(XZDEC_TOOLS)
+
+    if(XZ_TOOL_XZDEC)
+        list(APPEND XZDEC_TOOLS xzdec)
+    endif()
+
+    if(XZ_TOOL_LZMADEC)
+        list(APPEND XZDEC_TOOLS lzmadec)
+    endif()
+
+    foreach(XZDEC ${XZDEC_TOOLS})
         add_executable("${XZDEC}"
             src/common/sysdefs.h
             src/common/tuklib_common.h