From e5e15c04bc58c34906e6d7cfcbad68d1a5617563 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 27 Sep 2024 17:25:36 -0600 Subject: wip --- lib9p/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib9p/CMakeLists.txt (limited to 'lib9p/CMakeLists.txt') diff --git a/lib9p/CMakeLists.txt b/lib9p/CMakeLists.txt new file mode 100644 index 0000000..0faa109 --- /dev/null +++ b/lib9p/CMakeLists.txt @@ -0,0 +1,34 @@ +# libcr/CMakeLists.txt - TODO +# +# Copyright (C) 2024 Luke T. Shumaker +# SPDX-Licence-Identifier: AGPL-3.0-or-later + +add_library(lib9p INTERFACE) +target_sources(lib9p INTERFACE + types.c + 9p.c + srv.c +) +target_include_directories(lib9p SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) + +add_custom_command( + OUTPUT ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt + DEPENDS ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt.gen + COMMAND ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt.gen +) +add_custom_command( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/include/lib9p/linux-errno.h + DEPENDS include/lib9p/linux-errno.h.gen ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/include/lib9p/linux-errno.h.gen ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt >${CMAKE_CURRENT_SOURCE_DIR}/include/lib9p/linux-errno.h +) +add_custom_command( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/types.c ${CMAKE_CURRENT_SOURCE_DIR}/include/lib9p/_types.h + DEPENDS types.gen 9P2000.txt 9P2000.u.txt 9P2000.e.txt + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/types.gen 9P2000.txt 9P2000.u.txt 9P2000.e.txt +) +add_dependencies(generate + ${CMAKE_SOURCE_DIR}/3rd-party/linux-errno.txt + ${CMAKE_CURRENT_SOURCE_DIR}/linux-errno.h + ${CMAKE_CURRENT_SOURCE_DIR}/types.c + ${CMAKE_CURRENT_SOURCE_DIR}/include/lib9p/_types.h +) -- cgit v1.2.3-2-g168b