mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-12 22:55:44 +00:00
This allows the updater to work on older Windows XP systems without the VC++ 2008 runtime redistributable installed. * Add statically linked pre-built versions of the zlib and bzip2 libraries. This increases the size of the updater executable by 200KB to ~400KB on Windows.
44 lines
656 B
CMake
44 lines
656 B
CMake
project(minizip)
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
if (UNIX)
|
|
find_package(ZLIB REQUIRED)
|
|
endif()
|
|
|
|
set (SOURCES
|
|
ioapi.c
|
|
unzip.c
|
|
zip.c
|
|
)
|
|
|
|
set (HEADERS
|
|
ioapi.h
|
|
unzip.h
|
|
zip.h
|
|
)
|
|
|
|
if (APPLE)
|
|
# Mac OS X does not have fopen64()
|
|
# and several related functions as the standard fopen()
|
|
# calls are 64bit
|
|
add_definitions("-DUSE_FILE32API")
|
|
endif()
|
|
|
|
add_definitions("-DHAVE_BZIP2")
|
|
|
|
add_library(minizip
|
|
${SOURCES}
|
|
${HEADERS}
|
|
)
|
|
|
|
if (UNIX)
|
|
target_link_libraries(minizip z bz2)
|
|
else()
|
|
target_link_libraries(minizip
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../zlib/prebuilt/zlib_static.lib"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../bzip2/libbz2_static.lib"
|
|
)
|
|
endif()
|
|
|
|
|