summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar James Rowe2015-03-26 04:00:49 -0600
committerGravatar James Rowe2015-03-26 04:04:24 -0600
commit5b9a5493c5151fe326b495c944687fc690598ef5 (patch)
tree147a67ec72c914a4e6bb5a9d6f004cbcf55f64d7 /src
parentChanges to bring the previous commits in line with the comments on thepull re... (diff)
downloadyuzu-5b9a5493c5151fe326b495c944687fc690598ef5.tar.gz
yuzu-5b9a5493c5151fe326b495c944687fc690598ef5.tar.xz
yuzu-5b9a5493c5151fe326b495c944687fc690598ef5.zip
Updated the copy commands to run on post_build and use generator expressions to simplify the code as well
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/CMakeLists.txt53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 23513d7e2..2545b5d6a 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -77,34 +77,33 @@ target_link_libraries(citra-qt ${PLATFORM_LIBRARIES})
77 77
78if (Qt5_FOUND AND MSVC) 78if (Qt5_FOUND AND MSVC)
79 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin") 79 set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
80 file(GLOB Qt5_DEBUG_DLLS 80 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
81 "${Qt5_DLL_DIR}/icudt*.dll" 81 set(Qt5_DLLS
82 "${Qt5_DLL_DIR}/icuin*.dll" 82 icudt*.dll
83 "${Qt5_DLL_DIR}/icuuc*.dll" 83 icuin*.dll
84 "${Qt5_DLL_DIR}/Qt5Cored.*" 84 icuuc*.dll
85 "${Qt5_DLL_DIR}/Qt5Guid.*" 85 Qt5Core$<$<CONFIG:Debug>:d>.*
86 "${Qt5_DLL_DIR}/Qt5OpenGLd.*" 86 Qt5Gui$<$<CONFIG:Debug>:d>.*
87 "${Qt5_DLL_DIR}/Qt5Widgetsd.*" 87 Qt5OpenGL$<$<CONFIG:Debug>:d>.*
88 Qt5Widgets$<$<CONFIG:Debug>:d>.*
88 ) 89 )
89 file(GLOB Qt5_RELEASE_DLLS 90 set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
90 "${Qt5_DLL_DIR}/icudt*.dll" 91 set(PLATFORMS ${DLL_DEST}platforms/)
91 "${Qt5_DLL_DIR}/icuin*.dll" 92
92 "${Qt5_DLL_DIR}/icuuc*.dll" 93 # windows commandline expects the / to be \ so switch them
93 "${Qt5_DLL_DIR}/Qt5Core.*" 94 string(REPLACE "/" "\\" Qt5_DLL_DIR ${Qt5_DLL_DIR})
94 "${Qt5_DLL_DIR}/Qt5Gui.*" 95 string(REPLACE "/" "\\" Qt5_PLATFORMS_DIR ${Qt5_PLATFORMS_DIR})
95 "${Qt5_DLL_DIR}/Qt5OpenGL.*" 96 string(REPLACE "/" "\\" DLL_DEST ${DLL_DEST})
96 "${Qt5_DLL_DIR}/Qt5Widgets.*" 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"
97 ) 106 )
98 # make the output directories ahead of the time and copy in the needed Dlls now 107 unset(Qt5_DLLS)
99 file(MAKE_DIRECTORY
100 ${CMAKE_BINARY_DIR}/bin/Debug/
101 ${CMAKE_BINARY_DIR}/bin/Release/
102 ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo/
103 )
104 file(COPY ${Qt5_DEBUG_DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin/Debug/)
105 file(COPY ${Qt5_RELEASE_DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin/Release/)
106 file(COPY ${Qt5_RELEASE_DLLS} DESTINATION ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo/)
107 unset(Qt5_RELEASE_DLLS)
108 unset(Qt5_DEBUG_DLLS)
109 unset(Qt5_DLL_DIR) 108 unset(Qt5_DLL_DIR)
110endif() 109endif()