diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-03-21 23:36:00 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-04-25 20:18:00 +0800 |
commit | 622d0fdc02d5f565c2872d79bc70c669c95c8284 (patch) | |
tree | ce23f168fe33551d681b7287fd9ce09e0c90f970 /CMakeLists.txt | |
parent | CMake: Allow configuring features as cache variables. (diff) | |
download | xz-622d0fdc02d5f565c2872d79bc70c669c95c8284.tar.xz |
CMake: Conditionally build xz list.* files if decoders are enabled.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index db429560..b4a9e5d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -958,8 +958,6 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) src/xz/file_io.h src/xz/hardware.c src/xz/hardware.h - src/xz/list.c - src/xz/list.h src/xz/main.c src/xz/main.h src/xz/message.c @@ -982,6 +980,13 @@ if(NOT MSVC AND HAVE_GETOPT_LONG) src/liblzma/api ) + if(HAVE_DECODERS) + target_sources(xz PRIVATE + src/xz/list.c + src/xz/list.h + ) + endif() + target_link_libraries(xz PRIVATE liblzma) target_compile_definitions(xz PRIVATE ASSUME_RAM=128) |