reactos/sdk/lib/3rdparty/zlib/CMakeLists.txt
Jérôme Gardou 493ceb7ade [CMAKE] Fix host tools build on x86-64 mingw
Dynamically check for sys/types.h and pid_t in wine config.h
Use TARGET_xxx defines instead of _X86_ as this is undefined by GCC
Add some sense in include directories management by using interface
libraries
2019-11-15 16:22:06 +01:00

48 lines
1.3 KiB
CMake

add_definitions(-DNO_VIZ)
list(APPEND SOLO_SOURCE
adler32.c
crc32.c
deflate.c
inffast.c
inflate.c
inftrees.c
trees.c
zutil.c)
list(APPEND SOURCE
compress.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
infback.c
uncompr.c)
list(APPEND MINIZIP_SOURCE
contrib/minizip/crypt.h
contrib/minizip/ioapi.c
contrib/minizip/ioapi.h
contrib/minizip/iowin32.c
contrib/minizip/iowin32.h
contrib/minizip/unzip.c
contrib/minizip/unzip.h
contrib/minizip/zip.c
contrib/minizip/zip.h)
if(CMAKE_CROSSCOMPILING)
add_library(zlib ${SOURCE} ${SOLO_SOURCE})
target_include_directories(zlib PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
add_library(zlib_solo ${SOLO_SOURCE})
add_target_compile_definitions(zlib_solo Z_SOLO)
target_include_directories(zlib_solo PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
add_library(minizip ${MINIZIP_SOURCE})
add_dependencies(minizip psdk)
target_include_directories(minizip PRIVATE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
else()
add_library(zlibhost ${SOLO_SOURCE})
add_target_compile_definitions(zlibhost Z_SOLO)
target_include_directories(zlibhost PUBLIC ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
endif()