minitar/CMakeLists.txt
apio 7d4e774cf7
Rewrite the entire API just to eliminate heap allocations
Just bumping minor because nobody uses this and I don't want to jump up to 2.0.0
2022-12-25 14:33:47 +01:00

26 lines
678 B
CMake

cmake_minimum_required(VERSION 3.8..3.22)
project(minitar LANGUAGES C VERSION 1.3.0)
set(SOURCES
src/tar.c
src/util.c
)
add_library(minitar STATIC ${SOURCES})
target_include_directories(minitar PUBLIC ${CMAKE_CURRENT_LIST_DIR}) # for minitar.h
set_target_properties(minitar PROPERTIES OUTPUT_NAME mtar)
set_target_properties(minitar PROPERTIES C_STANDARD 11)
set_target_properties(minitar PROPERTIES C_STANDARD_REQUIRED ON)
if (MSVC)
target_compile_options(minitar PRIVATE /W4 /WX)
else()
target_compile_options(minitar PRIVATE -Wall -Wextra -pedantic -Werror)
endif()
install(TARGETS minitar DESTINATION lib)
install(FILES minitar.h DESTINATION include)