diff options
| author | 2015-05-14 20:55:58 -0700 | |
|---|---|---|
| committer | 2015-05-14 20:55:58 -0700 | |
| commit | a188e0fa574a9d8edc2d70aacf57af0f181cfbf3 (patch) | |
| tree | 793f87fe3ad40b5c533e0ad2bce96d5bc76929da /src | |
| parent | Merge pull request #762 from yuriks/memmap (diff) | |
| parent | Updated the appveyor build to no longer copy the QT dlls since it is done in ... (diff) | |
| download | yuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.tar.gz yuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.tar.xz yuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.zip | |
Merge pull request #675 from jroweboy/windows-build-fixes
Windows build fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index ff780cad4..efccdbec6 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt | |||
| @@ -74,3 +74,39 @@ target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) | |||
| 74 | target_link_libraries(citra-qt ${PLATFORM_LIBRARIES}) | 74 | target_link_libraries(citra-qt ${PLATFORM_LIBRARIES}) |
| 75 | 75 | ||
| 76 | #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) | 76 | #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) |
| 77 | |||
| 78 | if (Qt5_FOUND AND MSVC) | ||
| 79 | set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin") | ||
| 80 | set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/") | ||
| 81 | set(Qt5_DLLS | ||
| 82 | icudt*.dll | ||
| 83 | icuin*.dll | ||
| 84 | icuuc*.dll | ||
| 85 | Qt5Core$<$<CONFIG:Debug>:d>.* | ||
| 86 | Qt5Gui$<$<CONFIG:Debug>:d>.* | ||
| 87 | Qt5OpenGL$<$<CONFIG:Debug>:d>.* | ||
| 88 | Qt5Widgets$<$<CONFIG:Debug>:d>.* | ||
| 89 | ) | ||
| 90 | set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/") | ||
| 91 | set(PLATFORMS ${DLL_DEST}platforms/) | ||
| 92 | |||
| 93 | # windows commandline expects the / to be \ so switch them | ||
| 94 | string(REPLACE "/" "\\" Qt5_DLL_DIR ${Qt5_DLL_DIR}) | ||
| 95 | string(REPLACE "/" "\\" Qt5_PLATFORMS_DIR ${Qt5_PLATFORMS_DIR}) | ||
| 96 | string(REPLACE "/" "\\" DLL_DEST ${DLL_DEST}) | ||
| 97 | string(REPLACE "/" "\\" PLATFORMS ${PLATFORMS}) | ||
| 98 | |||
| 99 | # /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output | ||
| 100 | # cmake adds an extra check for command success which doesn't work too well with robocopy | ||
| 101 | # so trick it into thinking the command was successful with the || cmd /c "exit /b 0" | ||
| 102 | add_custom_command(TARGET citra-qt POST_BUILD | ||
| 103 | COMMAND robocopy ${Qt5_DLL_DIR} ${DLL_DEST} ${Qt5_DLLS} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0" | ||
| 104 | COMMAND if not exist ${PLATFORMS} mkdir ${PLATFORMS} 2> nul | ||
| 105 | COMMAND robocopy ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.* /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0" | ||
| 106 | ) | ||
| 107 | unset(Qt5_DLLS) | ||
| 108 | unset(Qt5_DLL_DIR) | ||
| 109 | unset(Qt5_PLATFORMS_DIR) | ||
| 110 | unset(DLL_DEST) | ||
| 111 | unset(PLATFORMS) | ||
| 112 | endif() | ||