From: Lasse Collin Date: Thu, 22 Aug 2024 11:06:16 +0000 (+0300) Subject: CMake: Fix the build when XZ_TOOL_LZMADEC=OFF X-Git-Tag: v5.7.1alpha~118 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=acdf21033abe347d9a279e9fe757f90ed16c1dbb;p=thirdparty%2Fxz.git CMake: Fix the build when XZ_TOOL_LZMADEC=OFF Co-developed-by: 榆柳松 (ZhengSen Wang) Fixes: fb50c6ba1d4c9405e5b12b5988b01a3002638c5d Fixes: https://github.com/tukaani-project/xz/pull/134 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 40da486e..995cae6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1868,8 +1868,10 @@ if(HAVE_DECODERS) COMPONENT "${XZDEC}_Runtime") endforeach() - # This is the only build-time difference with lzmadec. - target_compile_definitions(lzmadec PRIVATE "LZMADEC") + if(XZ_TOOL_LZMADEC) + # This is the only build-time difference with lzmadec. + target_compile_definitions(lzmadec PRIVATE "LZMADEC") + endif() if(UNIX) # NOTE: This puts the lzmadec.1 symlinks into xzdec_Documentation.