| 1 |
include(utils/disable_warnings) |
| 2 |
include(utils/find_include_dirs) |
| 3 |
|
| 4 |
set(INTERNAL_ZLIB_DIR ${SOURCE_DIR}/thirdparty/zlib-1.3.1) |
| 5 |
|
| 6 |
if(USE_INTERNAL_ZLIB) |
| 7 |
file(GLOB_RECURSE ZLIB_SOURCES ${INTERNAL_ZLIB_DIR}/*.c) |
| 8 |
disable_warnings(${ZLIB_SOURCES}) |
| 9 |
find_include_dirs(ZLIB_INCLUDE_DIRS ${INTERNAL_ZLIB_DIR}) |
| 10 |
set(ZLIB_DEFINITIONS NO_GZIP) |
| 11 |
list(APPEND SERVER_LIBRARY_SOURCES ${ZLIB_SOURCES}) |
| 12 |
list(APPEND CLIENT_LIBRARY_SOURCES ${ZLIB_SOURCES}) |
| 13 |
else() |
| 14 |
find_package(ZLIB REQUIRED) |
| 15 |
endif() |
| 16 |
|
| 17 |
list(APPEND SERVER_LIBRARIES ${ZLIB_LIBRARIES}) |
| 18 |
list(APPEND SERVER_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) |
| 19 |
list(APPEND SERVER_DEFINITIONS ${ZLIB_DEFINITIONS}) |
| 20 |
list(APPEND CLIENT_LIBRARIES ${ZLIB_LIBRARIES}) |
| 21 |
list(APPEND CLIENT_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS}) |
| 22 |
list(APPEND CLIENT_DEFINITIONS ${ZLIB_DEFINITIONS}) |