-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
25 lines (22 loc) · 894 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.13)
project(df-obsidian NONE)
set(PROTOC_BIN "protoc")
set(DFHACK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dfhack")
set(PROTO_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/dfhack_proto")
add_custom_command(OUTPUT protos
COMMAND git submodule update --init --recursive
COMMAND mkdir -p ${PROTO_OUTPUT_DIR}
COMMAND touch ${PROTO_OUTPUT_DIR}/__init__.py
COMMAND "${PROTOC_BIN}"
-I${DFHACK_DIR}/library/proto
-I${DFHACK_DIR}/plugins/remotefortressreader/proto
--python_out=${PROTO_OUTPUT_DIR}
${DFHACK_DIR}/plugins/remotefortressreader/proto/RemoteFortressReader.proto
${DFHACK_DIR}/plugins/remotefortressreader/proto/ItemdefInstrument.proto
${DFHACK_DIR}/library/proto/CoreProtocol.proto
${DFHACK_DIR}/library/proto/Basic.proto
${DFHACK_DIR}/library/proto/BasicApi.proto
)
add_custom_target(DONE ALL
DEPENDS protos
)