reactos/sdk/lib/3rdparty/zlib/CMakeLists.txt
Victor Perevertkin 7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00

49 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})
target_compile_definitions(zlib_solo PRIVATE 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})
target_compile_definitions(zlibhost PRIVATE Z_SOLO)
target_include_directories(zlibhost PUBLIC ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
endif()