-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 loc) · 770 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
cmake_minimum_required(VERSION 3.28)
project(SimZip
VERSION 0.9.0
DESCRIPTION "A minimal C++17 zip library for zip compression and decompression."
)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif ()
option(ENABLE_TESTS "Build the test" OFF)
add_library(SimZip
SimZip.cpp SimZip.h)
include(FetchContent)
FetchContent_Declare(miniz
GIT_REPOSITORY https://github.com/richgel999/miniz.git
GIT_TAG 3.0.2)
FetchContent_MakeAvailable(miniz)
target_include_directories(SimZip PUBLIC ${PROJECT_SOURCE_DIR})
target_link_libraries(SimZip PRIVATE miniz)
include(GNUInstallDirs)
if (ENABLE_TESTS)
enable_testing()
add_subdirectory(test)
endif ()