#4612 Fix build error without GRPC

This commit is contained in:
Gaute Lindkvist
2019-08-22 08:38:49 +02:00
parent 4af1963ac0
commit 9a2cf3d1ce

View File

@@ -706,7 +706,7 @@ if (RESINSIGHT_PRIVATE_INSTALL)
# install gRPC Python files
if (RESINSIGHT_ENABLE_GRPC)
message(STATUS "GRPC enabled")
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND EXISTS ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE})
message(STATUS "Python found")
if (RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE)
message(STATUS "Bundling Python GRPC modules")
@@ -716,9 +716,9 @@ if (RESINSIGHT_PRIVATE_INSTALL)
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} -m pip install --target=${CMAKE_BINARY_DIR}/Python grpcio
)
endif()
install(DIRECTORY ${CMAKE_BINARY_DIR}/Python/ DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/Python)
endif()
endif()
install(DIRECTORY ${CMAKE_BINARY_DIR}/Python/ DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/Python)
set (RESINSIGHT_FILES ${RESINSIGHT_FILES} ${RESINSIGHT_LICENSE_FILES})