aboutsummaryrefslogtreecommitdiff
path: root/cstring/CMakeLists.txt
blob: a1abde2585091efa90a5ec8bd6c7b794bffda466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
cmake_minimum_required(VERSION 3.5)

project(cstring)

set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED On)
set(CMAKE_C_EXTENSIONS Off)

add_library(cstring
  include/cstring.h
  src/cstring.c)

target_include_directories(cstring PUBLIC
  include)

target_link_libraries(cstring PUBLIC
  cassert)

if(LINUX)
  target_link_libraries(cstring PUBLIC
    -lbsd)
endif()