summaryrefslogtreecommitdiff
path: root/lib/zlib/CMakeLists.txt
diff options
context:
space:
mode:
authorJacek Kryszyn <j.kryszyn@samsung.com>2023-07-28 16:25:55 +0200
committerJacek Kryszyn <j.kryszyn@samsung.com>2023-07-28 16:25:55 +0200
commitbb3025f25201e59d0a7ba7d8bec2578480ed0689 (patch)
tree4e16d90a0f94efc9b3f8970d825dfaa718e45c8c /lib/zlib/CMakeLists.txt
parent3241cf203afc344273e5f6cc3d5ab40500717b5d (diff)
downloaddynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.tar.gz
dynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.tar.bz2
dynpart-tools-bb3025f25201e59d0a7ba7d8bec2578480ed0689.zip
lpmake is built using cmake. libraries added as subdirectories. static build
Diffstat (limited to 'lib/zlib/CMakeLists.txt')
-rw-r--r--lib/zlib/CMakeLists.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/zlib/CMakeLists.txt b/lib/zlib/CMakeLists.txt
new file mode 100644
index 0000000..19bcc69
--- /dev/null
+++ b/lib/zlib/CMakeLists.txt
@@ -0,0 +1,42 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(zlib VERSION 1.0.0 DESCRIPTION "zlib")
+
+add_library(zlib STATIC
+ adler32.c
+ compress.c
+ cpu_features.c
+ crc32.c
+ deflate.c
+ gzclose.c
+ gzlib.c
+ gzread.c
+ gzwrite.c
+ infback.c
+ inflate.c
+ inftrees.c
+ inffast.c
+ trees.c
+ uncompr.c
+ zutil.c
+)
+
+target_include_directories(zlib PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/.
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_definitions(zlib PRIVATE
+ -DHAVE_HIDDEN
+ -DZLIB_CONST
+)
+
+target_compile_options(zlib PRIVATE -O3)
+
+#cd ../zlib
+#$CC -I. -O3 -DHAVE_HIDDEN -DZLIB_CONST ${CFLAGS} -c adler32.c compress.c cpu_features.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inflate.c inftrees.c inffast.c trees.c uncompr.c zutil.c
+#$AR rcs ../lib/libz.a *.o
+#rm -r *.o \ No newline at end of file