mirror of
https://github.com/nesbox/TIC-80.git
synced 2026-04-18 14:32:31 +00:00
- fix use of deprecated macro - move network stuff to platform directory - ensure all lua is built for 32 bit integers - clean up build configurations - use newer docker image
34 lines
849 B
CMake
34 lines
849 B
CMake
################################
|
|
# ZLIB
|
|
################################
|
|
|
|
if(PREFER_SYSTEM_LIBRARIES)
|
|
find_package(PkgConfig)
|
|
pkg_check_modules(zlib IMPORTED_TARGET GLOBAL zlib)
|
|
if (zlib_FOUND)
|
|
add_library(zlib ALIAS PkgConfig::zlib)
|
|
message(STATUS "Use system library: zlib")
|
|
return()
|
|
else()
|
|
message(WARNING "System library zlib not found")
|
|
endif()
|
|
endif()
|
|
|
|
set(ZLIB_DIR ${THIRDPARTY_DIR}/zlib)
|
|
set(ZLIB_SRC
|
|
${ZLIB_DIR}/adler32.c
|
|
${ZLIB_DIR}/compress.c
|
|
${ZLIB_DIR}/crc32.c
|
|
${ZLIB_DIR}/deflate.c
|
|
${ZLIB_DIR}/inflate.c
|
|
${ZLIB_DIR}/infback.c
|
|
${ZLIB_DIR}/inftrees.c
|
|
${ZLIB_DIR}/inffast.c
|
|
${ZLIB_DIR}/trees.c
|
|
${ZLIB_DIR}/uncompr.c
|
|
${ZLIB_DIR}/zutil.c
|
|
)
|
|
|
|
add_library(zlib STATIC ${ZLIB_SRC})
|
|
target_include_directories(zlib INTERFACE ${THIRDPARTY_DIR}/zlib)
|