-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (39 loc) · 1.14 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.21)
include(cmake/prelude.cmake)
project(
ccontainer
VERSION 0.1.0
DESCRIPTION "Comprehensive library of data structures implemented in C."
HOMEPAGE_URL "https://leventkaya.com"
LANGUAGES NONE
)
include(cmake/variables.cmake)
# ---- Declare library ----
add_library(ccontainer_ccontainer INTERFACE)
add_library(ccontainer::ccontainer ALIAS ccontainer_ccontainer)
set_property(
TARGET ccontainer_ccontainer PROPERTY
EXPORT_NAME ccontainer
)
target_include_directories(
ccontainer_ccontainer ${warning_guard}
INTERFACE
"\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
)
target_compile_features(ccontainer_ccontainer INTERFACE c_std_99)
find_package(unity REQUIRED)
target_link_libraries(ccontainer_ccontainer INTERFACE unity::unity)
# ---- Install rules ----
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()
# ---- Developer mode ----
if(NOT ccontainer_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of ccontainer"
)
endif()
include(cmake/dev-mode.cmake)