GRPC Build issues: make sure we don't run configure_file on generated sources

This commit is contained in:
Gaute Lindkvist
2019-08-22 13:32:25 +02:00
parent 5b0d77f19a
commit fb4aff4836

View File

@@ -160,7 +160,6 @@ if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
${GRPC_PYTHON_SOURCE_PATH}/setup.py)
list(APPEND GRPC_PYTHON_SOURCES
${GRPC_PYTHON_GENERATED_SOURCES}
"rips/generated/RiaVersionInfo.py"
"rips/__init__.py"
"rips/App.py"
@@ -204,12 +203,18 @@ if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
"README.md"
"LICENSE"
)
foreach(PYTHON_SCRIPT ${GRPC_PYTHON_SOURCES})
list(APPEND GRPC_PYTHON_SOURCES_FULL_PATH "${GRPC_PYTHON_SOURCE_PATH}/${PYTHON_SCRIPT}")
# Copy into build folder so the python code is present for debugging
configure_file("${GRPC_PYTHON_SOURCE_PATH}/${PYTHON_SCRIPT}" "${CMAKE_BINARY_DIR}/Python/${PYTHON_SCRIPT}" COPYONLY)
endforeach()
list(APPEND GRPC_PYTHON_SOURCES ${GRPC_PYTHON_GENERATED_SOURCES})
foreach(PYTHON_SCRIPT ${GRPC_PYTHON_SOURCES})
list(APPEND GRPC_PYTHON_SOURCES_FULL_PATH "${GRPC_PYTHON_SOURCE_PATH}/${PYTHON_SCRIPT}")
endforeach()
if (MSVC)
source_group(TREE ${GRPC_PYTHON_SOURCE_PATH} FILES ${GRPC_PYTHON_SOURCES_FULL_PATH} PREFIX "GrpcInterface\\Python")
endif(MSVC)