1 2add_definitions(-DNO_VIZ) 3 4list(APPEND SOLO_SOURCE 5 adler32.c 6 crc32.c 7 deflate.c 8 inffast.c 9 inflate.c 10 inftrees.c 11 trees.c 12 zutil.c) 13 14list(APPEND SOURCE 15 compress.c 16 gzclose.c 17 gzlib.c 18 gzread.c 19 gzwrite.c 20 infback.c 21 uncompr.c) 22 23list(APPEND MINIZIP_SOURCE 24 contrib/minizip/crypt.h 25 contrib/minizip/ioapi.c 26 contrib/minizip/ioapi.h 27 contrib/minizip/iowin32.c 28 contrib/minizip/iowin32.h 29 contrib/minizip/unzip.c 30 contrib/minizip/unzip.h 31 contrib/minizip/zip.c 32 contrib/minizip/zip.h) 33 34 35if(CMAKE_CROSSCOMPILING) 36 add_library(zlib ${SOURCE} ${SOLO_SOURCE}) 37 target_include_directories(zlib PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib) 38 add_library(zlib_solo ${SOLO_SOURCE}) 39 target_compile_definitions(zlib_solo PRIVATE Z_SOLO) 40 target_include_directories(zlib_solo PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib) 41 add_library(minizip ${MINIZIP_SOURCE}) 42 add_dependencies(minizip psdk) 43 target_include_directories(minizip PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib) 44else() 45 add_library(zlibhost ${SOLO_SOURCE}) 46 target_compile_definitions(zlibhost PRIVATE Z_SOLO) 47 target_include_directories(zlibhost PUBLIC ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib) 48endif() 49