summaryrefslogtreecommitdiffstats
path: root/depends/xz-embedded
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-28 20:53:46 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-28 20:53:46 +0200
commit143e24fa04f0126d91b65b4035dd6ec556c79b00 (patch)
treeee0e78b50e9c433bb43149f503694843b9f2eae2 /depends/xz-embedded
parent33c3850b40aba095b056738448c235190aeb1aab (diff)
downloadMultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar
MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.gz
MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.lz
MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.xz
MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.zip
NOISSUE clean up some old cmake messes
Diffstat (limited to 'depends/xz-embedded')
-rw-r--r--depends/xz-embedded/CMakeLists.txt26
1 files changed, 10 insertions, 16 deletions
diff --git a/depends/xz-embedded/CMakeLists.txt b/depends/xz-embedded/CMakeLists.txt
index bc1759dc..5f744671 100644
--- a/depends/xz-embedded/CMakeLists.txt
+++ b/depends/xz-embedded/CMakeLists.txt
@@ -1,32 +1,26 @@
-cmake_minimum_required(VERSION 2.6)
-project(xz-embedded)
+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)
-set(CMAKE_C_FLAGS "-std=c99")
-
-include_directories(include)
-set(XZ_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
-
# See include/xz.h for manual feature configuration
# tweak this list and xz.h to fit your needs
set(XZ_SOURCES
- include/xz.h
- src/xz_config.h
src/xz_crc32.c
src/xz_crc64.c
src/xz_dec_lzma2.c
src/xz_dec_stream.c
- src/xz_lzma2.h
- src/xz_private.h
- src/xz_stream.h
# src/xz_dec_bcj.c
)
-# TODO: look into what would be needed for plain old lzma
-
add_library(xz-embedded STATIC ${XZ_SOURCES})
-add_executable(xzminidec xzminidec.c)
-target_link_libraries(xzminidec xz-embedded)
+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()