19 lines
583 B
CMake
19 lines
583 B
CMake
cmake_minimum_required(VERSION 2.8)
|
|
project(zip)
|
|
|
|
if (MSVC)
|
|
# Use secure functions by defaualt and suppress warnings about "deprecated" functions
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1")
|
|
endif (MSVC)
|
|
|
|
# zip
|
|
set(SRC src/miniz.h src/zip.h src/zip.c)
|
|
add_library(${CMAKE_PROJECT_NAME} ${SRC})
|
|
|
|
# test
|
|
enable_testing()
|
|
add_subdirectory(test)
|
|
|