diff options
Diffstat (limited to 'plugin/CMakeLists.txt')
-rw-r--r-- | plugin/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index f2745b2..2c34228 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt | |||
@@ -6,6 +6,8 @@ set(CMAKE_C_STANDARD 23) | |||
6 | set(CMAKE_C_STANDARD_REQUIRED On) | 6 | set(CMAKE_C_STANDARD_REQUIRED On) |
7 | set(CMAKE_C_EXTENSIONS Off) | 7 | set(CMAKE_C_EXTENSIONS Off) |
8 | 8 | ||
9 | # Library. | ||
10 | |||
9 | add_library(plugin | 11 | add_library(plugin |
10 | src/plugin.c) | 12 | src/plugin.c) |
11 | 13 | ||
@@ -18,3 +20,19 @@ target_link_libraries(plugin PRIVATE | |||
18 | log) | 20 | log) |
19 | 21 | ||
20 | target_compile_options(plugin PRIVATE -Wall -Wextra) | 22 | target_compile_options(plugin PRIVATE -Wall -Wextra) |
23 | |||
24 | # Test | ||
25 | |||
26 | add_library(hello_plugin SHARED | ||
27 | test/hello_plugin.c) | ||
28 | |||
29 | target_compile_options(hello_plugin PRIVATE -Wall -Wextra) | ||
30 | |||
31 | add_executable(plugin_test | ||
32 | test/plugin_test.c) | ||
33 | |||
34 | target_link_libraries(plugin_test | ||
35 | plugin | ||
36 | test) | ||
37 | |||
38 | target_compile_options(plugin_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra) | ||