summaryrefslogtreecommitdiff
path: root/CMakeModules/CopyYuzuQt5Deps.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeModules/CopyYuzuQt5Deps.cmake')
-rw-r--r--CMakeModules/CopyYuzuQt5Deps.cmake135
1 files changed, 97 insertions, 38 deletions
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake
index 59343b1ca..4a6aeebbb 100644
--- a/CMakeModules/CopyYuzuQt5Deps.cmake
+++ b/CMakeModules/CopyYuzuQt5Deps.cmake
@@ -1,52 +1,111 @@
1function(copy_yuzu_Qt5_deps target_dir) 1function(copy_yuzu_Qt5_deps target_dir)
2 include(WindowsCopyFiles) 2 include(WindowsCopyFiles)
3 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/") 3 if (MSVC)
4 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin") 4 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
5 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
6 else()
7 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/")
8 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../lib/")
9 endif()
5 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/") 10 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
11 set(Qt5_PLATFORMTHEMES_DIR "${Qt5_DIR}/../../../plugins/platformthemes/")
12 set(Qt5_PLATFORMINPUTCONTEXTS_DIR "${Qt5_DIR}/../../../plugins/platforminputcontexts/")
13 set(Qt5_XCBGLINTEGRATIONS_DIR "${Qt5_DIR}/../../../plugins/xcbglintegrations/")
6 set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/") 14 set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/")
7 set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/") 15 set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/")
8 set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/") 16 set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/")
9 set(PLATFORMS ${DLL_DEST}plugins/platforms/) 17 set(PLATFORMS ${DLL_DEST}plugins/platforms/)
10 set(STYLES ${DLL_DEST}plugins/styles/) 18 set(STYLES ${DLL_DEST}plugins/styles/)
11 set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) 19 set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
12 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} 20 if (MSVC)
13 icudt*.dll 21 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
14 icuin*.dll 22 icudt*.dll
15 icuuc*.dll 23 icuin*.dll
16 Qt5Core$<$<CONFIG:Debug>:d>.* 24 icuuc*.dll
17 Qt5Gui$<$<CONFIG:Debug>:d>.* 25 Qt5Core$<$<CONFIG:Debug>:d>.*
18 Qt5Widgets$<$<CONFIG:Debug>:d>.* 26 Qt5Gui$<$<CONFIG:Debug>:d>.*
19 ) 27 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 ) 28 )
35 29
36 windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST} 30 if (YUZU_USE_QT_WEB_ENGINE)
37 qtwebengine_resources.pak 31 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
38 qtwebengine_devtools_resources.pak 32 Qt5Network$<$<CONFIG:Debug>:d>.*
39 qtwebengine_resources_100p.pak 33 Qt5Positioning$<$<CONFIG:Debug>:d>.*
40 qtwebengine_resources_200p.pak 34 Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
41 icudtl.dat 35 Qt5Qml$<$<CONFIG:Debug>:d>.*
42 ) 36 Qt5Quick$<$<CONFIG:Debug>:d>.*
43 endif () 37 Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
44 windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) 38 Qt5WebChannel$<$<CONFIG:Debug>:d>.*
45 windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*) 39 Qt5WebEngine$<$<CONFIG:Debug>:d>.*
46 windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} 40 Qt5WebEngineCore$<$<CONFIG:Debug>:d>.*
47 qjpeg$<$<CONFIG:Debug>:d>.* 41 Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.*
48 qgif$<$<CONFIG:Debug>:d>.* 42 QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
49 ) 43 )
44
45 windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST}
46 qtwebengine_resources.pak
47 qtwebengine_devtools_resources.pak
48 qtwebengine_resources_100p.pak
49 qtwebengine_resources_200p.pak
50 icudtl.dat
51 )
52 endif ()
53 windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
54 windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
55 windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
56 qjpeg$<$<CONFIG:Debug>:d>.*
57 qgif$<$<CONFIG:Debug>:d>.*
58 )
59 else()
60 set(Qt5_DLLS
61 "${Qt5_DLL_DIR}libQt5Core.so.5"
62 "${Qt5_DLL_DIR}libQt5DBus.so.5"
63 "${Qt5_DLL_DIR}libQt5Gui.so.5"
64 "${Qt5_DLL_DIR}libQt5Widgets.so.5"
65 "${Qt5_DLL_DIR}libQt5XcbQpa.so.5"
66 "${Qt5_DLL_DIR}libicudata.so.60"
67 "${Qt5_DLL_DIR}libicui18n.so.60"
68 "${Qt5_DLL_DIR}libicuuc.so.60"
69 )
70 set(Qt5_IMAGEFORMAT_DLLS
71 "${Qt5_IMAGEFORMATS_DIR}libqjpeg.so"
72 "${Qt5_IMAGEFORMATS_DIR}libqgif.so"
73 "${Qt5_IMAGEFORMATS_DIR}libqico.so"
74 )
75 set(Qt5_PLATFORMTHEME_DLLS
76 "${Qt5_PLATFORMTHEMES_DIR}libqgtk3.so"
77 "${Qt5_PLATFORMTHEMES_DIR}libqxdgdesktopportal.so"
78 )
79 set(Qt5_PLATFORM_DLLS
80 "${Qt5_PLATFORMS_DIR}libqxcb.so"
81 )
82 set(Qt5_PLATFORMINPUTCONTEXT_DLLS
83 "${Qt5_PLATFORMINPUTCONTEXTS_DIR}libcomposeplatforminputcontextplugin.so"
84 "${Qt5_PLATFORMINPUTCONTEXTS_DIR}libibusplatforminputcontextplugin.so"
85 )
86 set(Qt5_XCBGLINTEGRATION_DLLS
87 "${Qt5_XCBGLINTEGRATIONS_DIR}libqxcb-glx-integration.so"
88 )
89 foreach(LIB ${Qt5_DLLS})
90 file(COPY ${LIB} DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
91 endforeach()
92 foreach(LIB ${Qt5_IMAGEFORMAT_DLLS})
93 file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
94 endforeach()
95 foreach(LIB ${Qt5_PLATFORMTHEME_DLLS})
96 file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
97 endforeach()
98 foreach(LIB ${Qt5_PLATFORM_DLLS})
99 file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
100 endforeach()
101 foreach(LIB ${Qt5_PLATFORMINPUTCONTEXT_DLLS})
102 file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
103 endforeach()
104 foreach(LIB ${Qt5_XCBGLINTEGRATION_DLLS})
105 file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
106 endforeach()
107
108 endif()
50 # Create an empty qt.conf file. Qt will detect that this file exists, and use the folder that its in as the root folder. 109 # Create an empty qt.conf file. Qt will detect that this file exists, and use the folder that its in as the root folder.
51 # This way it'll look for plugins in the root/plugins/ folder 110 # This way it'll look for plugins in the root/plugins/ folder
52 add_custom_command(TARGET yuzu POST_BUILD 111 add_custom_command(TARGET yuzu POST_BUILD