summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22e6c70e..7fb7ad4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,12 +46,12 @@ if(nanopb_BUILD_GENERATOR)
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} -I${PROJECT_SOURCE_DIR}/generator/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()