CopyYuzuQt5Deps.cmake 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. function(copy_yuzu_Qt5_deps target_dir)
  2. include(WindowsCopyFiles)
  3. set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
  4. set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
  5. set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
  6. set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/")
  7. set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/")
  8. set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/")
  9. set(PLATFORMS ${DLL_DEST}plugins/platforms/)
  10. set(STYLES ${DLL_DEST}plugins/styles/)
  11. set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
  12. windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
  13. icudt*.dll
  14. icuin*.dll
  15. icuuc*.dll
  16. Qt5Core$<$<CONFIG:Debug>:d>.*
  17. Qt5Gui$<$<CONFIG:Debug>:d>.*
  18. Qt5OpenGL$<$<CONFIG:Debug>:d>.*
  19. Qt5Widgets$<$<CONFIG:Debug>:d>.*
  20. )
  21. if (YUZU_USE_QT_WEB_ENGINE)
  22. windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
  23. Qt5Network$<$<CONFIG:Debug>:d>.*
  24. Qt5Positioning$<$<CONFIG:Debug>:d>.*
  25. Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
  26. Qt5Qml$<$<CONFIG:Debug>:d>.*
  27. Qt5Quick$<$<CONFIG:Debug>:d>.*
  28. Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
  29. Qt5WebChannel$<$<CONFIG:Debug>:d>.*
  30. Qt5WebEngine$<$<CONFIG:Debug>:d>.*
  31. Qt5WebEngineCore$<$<CONFIG:Debug>:d>.*
  32. Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.*
  33. QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
  34. )
  35. windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST}
  36. qtwebengine_resources.pak
  37. qtwebengine_devtools_resources.pak
  38. qtwebengine_resources_100p.pak
  39. qtwebengine_resources_200p.pak
  40. icudtl.dat
  41. )
  42. endif ()
  43. windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
  44. windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
  45. windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
  46. qjpeg$<$<CONFIG:Debug>:d>.*
  47. qgif$<$<CONFIG:Debug>:d>.*
  48. )
  49. # Create an empty qt.conf file. Qt will detect that this file exists, and use the folder that its in as the root folder.
  50. # This way it'll look for plugins in the root/plugins/ folder
  51. add_custom_command(TARGET yuzu POST_BUILD
  52. COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf
  53. )
  54. endfunction(copy_yuzu_Qt5_deps)