summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2017-03-28 23:21:43 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2017-03-28 23:21:43 +0300
commit651bdc45f2180b17c132470ff1a3a515dbffaa78 (patch)
tree997985c39f209c399d294711dcfd3cd366d9d228 /CMakeLists.txt
parent25210ac1419567178502e99f005ddb49c4e63d21 (diff)
parent90c7269b634845a6318a7969a600d800aae70e1d (diff)
Merge branch 'master' of github.com:nanopb/nanopb
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c78f8c3c..7fb7ad4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,16 +42,16 @@ if(nanopb_BUILD_GENERATOR)
)
foreach(generator_proto IN LISTS generator_protos)
- string(REGEX REPLACE "([^;]+)" "generator/proto/\\1.proto" generator_proto_file "${generator_proto}")
+ string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/generator/proto/\\1.proto" generator_proto_file "${generator_proto}")
string(REGEX REPLACE "([^;]+)" "\\1_pb2.py" generator_proto_py_file "${generator_proto}")
add_custom_command(
OUTPUT ${generator_proto_py_file}
- COMMAND protoc --python_out=${CMAKE_CURRENT_BINARY_DIR} -Igenerator/proto ${generator_proto_file}
+ COMMAND protoc --python_out=${PROJECT_BINARY_DIR} -I${PROJECT_SOURCE_DIR}/generator/proto ${generator_proto_file}
DEPENDS ${generator_proto_file}
)
add_custom_target("generate_${generator_proto_py_file}" ALL DEPENDS ${generator_proto_py_file})
install(
- FILES ${generator_proto_py_file}
+ FILES ${PROJECT_BINARY_DIR}/${generator_proto_py_file}
DESTINATION ${PYTHON_INSTDIR}
)
endforeach()