if(GJDM_ENABLE_DEV) if(SYS_WIN) if(NOT EXISTS "$/GJDM.ini") get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) foreach(_lib ${FastCAE_Runtimes_Libraries}) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ $ ) endforeach() # 在windows环境需要拷贝所有依赖库的dll到构建目录 add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD #[[COMMAND ${CMAKE_COMMAND} -E copy $ $ COMMAND_EXPAND_LISTS]] # COMMAND ${CMAKE_COMMAND} -E copy # # 拷贝Gmsh执行程序 # ${Gmsh_BINARY_DIRS} # $ COMMAND ${CMAKE_COMMAND} -E copy # 拷贝CFD执行程序 ${CFD_EXECUTABLE} $ COMMAND ${CMAKE_COMMAND} -E copy # 拷贝IR执行程序 ${IR_EXECUTABLE} $ COMMAND ${CMAKE_COMMAND} -E copy # 拷贝Ps-Tools执行程序 ${CMAKE_SOURCE_DIR}/extlib/PSTools/pssuspend.exe $ COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝python的Lib文件夹 ${Python_DIRS}/Lib $/Lib COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝python的DLLs文件夹 ${Python_DIRS}/DLLs $/DLLs COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝python的tcl文件夹 ${Python_DIRS}/tcl $/tcl COMMAND ${CMAKE_COMMAND} -E copy # 拷贝python执行程序 ${Python_EXECUTABLE} $ COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝Qt图片格式支持文件 ${_qt_bin_dir}/../plugins/imageformats $/imageformats COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝Qt平台支持文件 ${_qt_bin_dir}/../plugins/platforms $/platforms COMMAND ${CMAKE_COMMAND} -E copy # 拷贝licensecc库 ${licensecc_LIB} $ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/CFD/reprocess.py ${CMAKE_SOURCE_DIR}/src/IR/irPlot.py $ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/extlib/Database $/Database COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝cart需要的数据库目录 ${CART_DIRS}/USER $/USER COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝cart需要的数据库目录 ${CART_DIRS}/DATA $/DATA COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝cart需要的数据库目录 ${CART_DIRS}/INPUT $/INPUT COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝cart需要的数据库目录 ${CART_DIRS}/OUTPUT $/OUTPUT COMMAND ${CMAKE_COMMAND} -E copy # 拷贝cart需要的库 ${CART_DIRS}/msvcr110.dll ${CART_DIRS}/svml_dispmd.dll ${CART_DIRS}/Licensecode.txt $ COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝Modtran的Lib文件夹 ${MODTRAN_DIRS} $/Modtran COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝ParaView的Lib文件夹 ${PARAVIEW_DIRS} $/ParaView COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝mesh文件夹 ${Gmsh_DIRS}/mesh $/mesh COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝tecplot ${CMAKE_SOURCE_DIR}/extlib/tecplot $/Tecplot ) endif() else() if(NOT EXISTS "$/GJDM.ini") get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) foreach(_lib ${FastCAE_Runtimes_Libraries}) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ $ $ ) endforeach() add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${Gmsh_EXECUTABLE} $ COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝python的python3.12文件夹 ${Python_DIRS}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR} $/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR} COMMAND ${CMAKE_COMMAND} -E copy_directory # 拷贝Qt图片格式支持文件 ${_qt_bin_dir}/../plugins/imageformats $/imageformats COMMAND ${CMAKE_COMMAND} -E copy_directory ${_qt_bin_dir}/../plugins/platforms $/platforms COMMAND ${CMAKE_COMMAND} -E copy_directory ${_qt_bin_dir}/../plugins/platforminputcontexts $/platforminputcontexts COMMAND ${CMAKE_COMMAND} -E copy_directory ${_qt_bin_dir}/../plugins/xcbglintegrations $/xcbglintegrations COMMAND ${CMAKE_COMMAND} -E copy $ $ $ ) file( COPY # 拷贝Qt多国语言支持文件 ${_qt_bin_dir}/../lib DESTINATION ${DEVRUNTIME_LIBDIR}/.. USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN "cmake*" EXCLUDE PATTERN "pkgconfig*" EXCLUDE PATTERN "libicu*.so*" ) endif() endif() #配置文件,python脚本,有可能会修改,每次构建都会拷贝 add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/PythonModule/py/GJDM.ini ${CMAKE_SOURCE_DIR}/src/PythonModule/py/CAD.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Case.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/ControlPanel.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Geometry.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/MainWindow.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Material.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Mesh.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Mesher.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/Post.py ${CMAKE_SOURCE_DIR}/src/PythonModule/py/PostProcess.py $ ) endif()