blob: 0faa1093b72ce6729cd89f502a3bb21669017901 (
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
|
# libcr/CMakeLists.txt - TODO
#
# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
# 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
)
|