2022-05-30 23:58:19 +02:00
|
|
|
set(ZLIB_SRC "zlib/adler32.c"
|
|
|
|
|
"zlib/compress.c"
|
|
|
|
|
"zlib/crc32.c"
|
|
|
|
|
"zlib/deflate.c"
|
|
|
|
|
"zlib/gzclose.c"
|
|
|
|
|
"zlib/gzlib.c"
|
|
|
|
|
"zlib/gzread.c"
|
|
|
|
|
"zlib/gzwrite.c"
|
|
|
|
|
"zlib/infback.c"
|
|
|
|
|
"zlib/inffast.c"
|
|
|
|
|
"zlib/inflate.c"
|
|
|
|
|
"zlib/inftrees.c"
|
|
|
|
|
"zlib/trees.c"
|
|
|
|
|
"zlib/uncompr.c"
|
|
|
|
|
"zlib/zutil.c")
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
set(ZLIB_HPP "zlib/crc32.h"
|
|
|
|
|
"zlib/deflate.h"
|
|
|
|
|
"zlib/gzguts.h"
|
|
|
|
|
"zlib/inffast.h"
|
|
|
|
|
"zlib/inffixed.h"
|
|
|
|
|
"zlib/inflate.h"
|
|
|
|
|
"zlib/inftrees.h"
|
|
|
|
|
"zlib/trees.h"
|
|
|
|
|
"zlib/zconf.h"
|
|
|
|
|
"zlib/zlib.h"
|
|
|
|
|
"zlib/zutil.h")
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
source_group("" FILES ${ZLIB_SRC} ${ZLIB_HPP})
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
add_library("zlib" STATIC ${ZLIB_SRC} ${ZLIB_HPP})
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
set_property(TARGET "zlib" PROPERTY FOLDER "External Libraries")
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2024-04-20 15:51:59 -07:00
|
|
|
# Fixes clang build failures
|
|
|
|
|
# See itgmania/itgmania#107 for details
|
|
|
|
|
# TODO(teejusb/natano): Remove these two lines once these issues have been fixed upstream.
|
|
|
|
|
set_property(TARGET "zlib" PROPERTY C_STANDARD 90)
|
|
|
|
|
set_property(TARGET "zlib" PROPERTY C_STANDARD_REQUIRED ON)
|
2023-05-22 11:11:51 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
disable_project_warnings("zlib")
|
2014-10-17 21:23:00 -04:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
if(MSVC)
|
|
|
|
|
target_compile_definitions("zlib" PRIVATE _MBCS)
|
|
|
|
|
endif(MSVC)
|
2022-05-29 11:45:31 +02:00
|
|
|
|
2022-05-30 23:58:19 +02:00
|
|
|
target_include_directories("zlib" PUBLIC "zlib")
|