aboutsummaryrefslogtreecommitdiff
path: root/plugin/CMakeLists.txt
blob: 2c342288c51bdbd2f37d06e9c63c812201449a98 (plain)
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
cmake_minimum_required(VERSION 3.5)

project(plugin)

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

# Library.

add_library(plugin
  src/plugin.c)

target_include_directories(plugin PUBLIC
  include)

target_link_libraries(plugin PRIVATE
  cstring
  list
  log)

target_compile_options(plugin PRIVATE -Wall -Wextra)

# Test

add_library(hello_plugin SHARED
  test/hello_plugin.c)

target_compile_options(hello_plugin PRIVATE -Wall -Wextra)

add_executable(plugin_test
  test/plugin_test.c)

target_link_libraries(plugin_test
  plugin
  test)

target_compile_options(plugin_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra)