-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
49 lines (38 loc) · 913 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright (c) 2021 Marceline Cramer
# SPDX-License-Identifier: MIT
cmake_minimum_required (VERSION 3.18)
project (canary VERSION 0.0.0)
# options
option (ENABLE_TESTS "Enable testing suite.")
# C standard
set (CMAKE_C_STANDARD 99)
set (CMAKE_C_STANDARD_REQUIRED TRUE)
add_compile_options (-Wpedantic)
# dependencies
find_package (mdo-utils REQUIRED)
find_package (Threads REQUIRED)
# libraries
add_subdirectory (lib)
# setup library
include (mondradiko_setup_library)
mondradiko_setup_library (canary CANARY_OBJ
src/draw_list.c
src/panel.c
src/script.c
)
set (CANARY_LIBS
mondradiko::mdo-utils
wasmtime::wasmtime
Threads::Threads
${CMAKE_DL_LIBS}
)
if (UNIX)
list (APPEND CANARY_LIBS m)
endif()
target_link_libraries (${CANARY_OBJ} ${CANARY_LIBS})
target_include_directories (${CANARY_OBJ} PUBLIC lib)
# tests
if (ENABLE_TESTS)
enable_testing ()
add_subdirectory (tests)
endif ()