forked from McArcady/dfhack-client-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
25 lines (22 loc) · 744 Bytes
/
CMakeLists.txt
File metadata and controls
25 lines (22 loc) · 744 Bytes
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(blendwarf NONE)
set(PROTOC-BIN "protoc")
set(PROTO-DIR-CORE "${CMAKE_CURRENT_SOURCE_DIR}/../dfhack/library/proto")
set(PROTO-DIR-PLUGINS "${CMAKE_CURRENT_SOURCE_DIR}/../dfhack/plugins/proto")
set(PY-DIR "${CMAKE_CURRENT_BINARY_DIR}/py_export")
add_custom_command(OUTPUT protos
COMMAND mkdir -p ${PY-DIR}
COMMAND touch ${PY-DIR}/__init__.py
COMMAND "${PROTOC-BIN}"
-I${PROTO-DIR-CORE}
-I${PROTO-DIR-PLUGINS}
--python_out=${PY-DIR}
${PROTO-DIR-PLUGINS}/RemoteFortressReader.proto
${PROTO-DIR-PLUGINS}/ItemdefInstrument.proto
${PROTO-DIR-CORE}/CoreProtocol.proto
${PROTO-DIR-CORE}/Basic.proto
${PROTO-DIR-CORE}/BasicApi.proto
)
add_custom_target(DONE ALL
DEPENDS protos
)