blob: 9f2d76584ccf35949094892774dc813d43856452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 PRIVATE
${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
|