summaryrefslogtreecommitdiff
path: root/lib9p/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-13 22:13:43 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-14 00:05:05 -0600
commit1e4ad99311611a7fbb5cdfe4b1b79202381dc717 (patch)
tree9ac29b2ba82c3cd95eb86715f4bdc4ca8a72ce4b /lib9p/CMakeLists.txt
parentb1fcc4ac2f244dddd869054db5dc6753c099a3e0 (diff)
Split lib9p into lib9p_core and lib9p_srv
Diffstat (limited to 'lib9p/CMakeLists.txt')
-rw-r--r--lib9p/CMakeLists.txt30
1 files changed, 19 insertions, 11 deletions
diff --git a/lib9p/CMakeLists.txt b/lib9p/CMakeLists.txt
index 949b6d6..543d01a 100644
--- a/lib9p/CMakeLists.txt
+++ b/lib9p/CMakeLists.txt
@@ -3,27 +3,35 @@
# Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
-add_library(lib9p INTERFACE)
-target_include_directories(lib9p PUBLIC INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
-target_sources(lib9p INTERFACE
- 9p.generated.c
- 9p.c
- tables.c
- srv.c
+add_library(lib9p_core INTERFACE)
+target_include_directories(lib9p_core PUBLIC INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/core_include)
+target_sources(lib9p_core INTERFACE
+ core.c
+ core_generated.c
+ core_tables.c
)
-target_link_libraries(lib9p INTERFACE
- libcr_ipc
+target_link_libraries(lib9p_core INTERFACE
libfmt
libhw_generic
libmisc
)
+add_library(lib9p_srv INTERFACE)
+target_include_directories(lib9p_srv PUBLIC INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/srv_include)
+target_sources(lib9p_srv INTERFACE
+ srv.c
+)
+target_link_libraries(lib9p_srv INTERFACE
+ lib9p_core
+ libcr_ipc
+)
+
if (ENABLE_TESTS)
add_subdirectory(tests/test_server)
function(add_lib9p_executable arg_testname)
add_executable("${arg_testname}" "tests/${arg_testname}.c")
- target_link_libraries("${arg_testname}" lib9p)
+ target_link_libraries("${arg_testname}" lib9p_core)
target_include_directories("${arg_testname}" PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/tests
${CMAKE_CURRENT_SOURCE_DIR}/tests/client_config
@@ -42,6 +50,6 @@ if (ENABLE_TESTS)
add_lib9p_executable("testclient-sess")
add_lib9p_test("./testclient-sess")
- add_lib_test(lib9p test_compile)
+ add_lib_test(lib9p_core test_compile)
target_include_directories(test_compile PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_compile_config)
endif()