summaryrefslogtreecommitdiffstats
path: root/libraries/xz-embedded/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-04-10 15:53:05 +0200
committerPetr Mrázek <peterix@gmail.com>2016-05-01 00:00:14 +0200
commitb6d455a02bd338e9dc0faa09d4d8177ecd8d569a (patch)
tree41982bca1ede50049f2f8c7109dd18edeefde6d0 /libraries/xz-embedded/CMakeLists.txt
parent47e37635f50c09b4f9a9ee7699e3120bab3e4088 (diff)
downloadMultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar
MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.gz
MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.lz
MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.xz
MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.zip
NOISSUE reorganize and document libraries
Diffstat (limited to 'libraries/xz-embedded/CMakeLists.txt')
-rw-r--r--libraries/xz-embedded/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/libraries/xz-embedded/CMakeLists.txt b/libraries/xz-embedded/CMakeLists.txt
new file mode 100644
index 00000000..5f744671
--- /dev/null
+++ b/libraries/xz-embedded/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.1)
+project(xz-embedded LANGUAGES C)
+
+option(XZ_BUILD_BCJ "Build xz-embedded with BCJ support (native binary optimization)" OFF)
+option(XZ_BUILD_CRC64 "Build xz-embedded with CRC64 checksum support" ON)
+option(XZ_BUILD_MINIDEC "Build a tiny utility that decompresses xz streams" OFF)
+
+# See include/xz.h for manual feature configuration
+# tweak this list and xz.h to fit your needs
+
+set(XZ_SOURCES
+ src/xz_crc32.c
+ src/xz_crc64.c
+ src/xz_dec_lzma2.c
+ src/xz_dec_stream.c
+# src/xz_dec_bcj.c
+)
+add_library(xz-embedded STATIC ${XZ_SOURCES})
+target_include_directories(xz-embedded PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
+set_property(TARGET xz-embedded PROPERTY C_STANDARD 99)
+
+if(${XZ_BUILD_MINIDEC})
+ add_executable(xzminidec xzminidec.c)
+ target_link_libraries(xzminidec xz-embedded)
+ set_property(TARGET xzminidec PROPERTY C_STANDARD 99)
+endif()