File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
src/rp2_common/pico_uzlib Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ set (UZLIB_TEST_PATH "src/tinflate.c" )
2
+ if (NOT PICO_UZLIB_PATH)
3
+ set (PICO_UZLIB_PATH ${PROJECT_SOURCE_DIR} /lib/uzlib)
4
+ endif ()
5
+ if (NOT EXISTS ${PICO_UZLIB_PATH} /${UZLIB_TEST_PATH} )
6
+ message (WARNING "uzlib content not present." )
7
+ endif ()
8
+
9
+ if (EXISTS ${PICO_UZLIB_PATH} /${UZLIB_TEST_PATH} )
10
+ message ("uzlib available at ${PICO_UZLIB_PATH} " )
11
+
12
+ pico_register_common_scope_var(PICO_UZLIB_PATH)
13
+
14
+ add_library (pico_uzlib INTERFACE )
15
+ target_sources (pico_uzlib INTERFACE
16
+ ${PICO_UZLIB_PATH} /src/tinflate.c
17
+ ${PICO_UZLIB_PATH} /src/tinfgzip.c
18
+ ${PICO_UZLIB_PATH} /src/tinfzlib.c
19
+ ${PICO_UZLIB_PATH} /src/adler32.c
20
+ ${PICO_UZLIB_PATH} /src/crc32.c
21
+ ${PICO_UZLIB_PATH} /src/defl_static.c
22
+ )
23
+ target_include_directories (pico_uzlib INTERFACE
24
+ ${PICO_UZLIB_PATH} /src
25
+ )
26
+
27
+ pico_promote_common_scope_vars()
28
+
29
+ function (suppress_uzlib_warnings)
30
+ set_source_files_properties (
31
+ ${PICO_UZLIB_PATH} /src/defl_static.c
32
+ PROPERTIES
33
+ COMPILE_OPTIONS "-Wno-redundant-decls"
34
+ )
35
+ set_source_files_properties (
36
+ ${PICO_UZLIB_PATH} /src/tinflate.c
37
+ PROPERTIES
38
+ COMPILE_OPTIONS "-Wno-sign-compare"
39
+ )
40
+ endfunction ()
41
+
42
+ endif ()
You can’t perform that action at this time.
0 commit comments