#7411 Python : Copy Python module to build folder

Remove obsolete _unityTargetName used by cotire
This commit is contained in:
Magne Sjaastad 2021-02-22 18:09:49 +01:00
parent 7d5268987c
commit 9cb59f9ea4
2 changed files with 12 additions and 22 deletions

View File

@ -343,13 +343,6 @@ foreach(FILE_TO_COPY ${RI_DLL_FILENAMES})
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE_TO_COPY}
$<TARGET_FILE_DIR:ResInsight>)
if(_unityTargetName)
add_custom_command(
TARGET ${_unityTargetName}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE_TO_COPY}
$<TARGET_FILE_DIR:ResInsight>)
endif()
endforeach()
# Generate Python code in a target that is part of ALL_BUILD and depends on
@ -368,6 +361,16 @@ if(RESINSIGHT_ENABLE_GRPC)
source_group("Source Files" ${GENERATED_CLASSES_FILE})
add_dependencies(RipsGeneratedPythonClasses ResInsight)
# Copy the Python folder to build folder. This will ease debugging of Python scripts
add_custom_command(
TARGET RipsGeneratedPythonClasses
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
"${CMAKE_SOURCE_DIR}/GrpcInterface/Python"
$<TARGET_FILE_DIR:ResInsight>/Python)
endif(RESINSIGHT_ENABLE_GRPC)
# ##############################################################################
@ -526,17 +529,6 @@ if(RESINSIGHT_PRIVATE_INSTALL)
"${CMAKE_CURRENT_BINARY_DIR}/windeployqt/"
$<TARGET_FILE_DIR:ResInsight>)
if(_unityTargetName)
foreach(qtlib ${QT_LIBRARIES})
add_custom_command(
TARGET ${_unityTargetName}
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}>
$<TARGET_FILE_DIR:${_unityTargetName}>)
endforeach(qtlib)
endif(_unityTargetName)
# copy deployment directory during installation
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/"
DESTINATION ${RESINSIGHT_INSTALL_FOLDER})

View File

@ -80,13 +80,11 @@ QProcessEnvironment RiaGrpcApplicationInterface::grpcProcessEnvironment() const
QStringList ripsLocations;
QString separator;
#ifdef WIN32
ripsLocations << QCoreApplication::applicationDirPath() + "\\Python"
<< QCoreApplication::applicationDirPath() + "\\..\\..\\Python";
ripsLocations << QCoreApplication::applicationDirPath() + "\\Python";
separator = ";";
#else
ripsLocations << QCoreApplication::applicationDirPath() + "/Python"
<< QCoreApplication::applicationDirPath() + "/../../Python";
ripsLocations << QCoreApplication::applicationDirPath() + "/Python";
separator = ":";
#endif
penv.insert( "PYTHONPATH",