summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-05-14 20:55:58 -0700
committerGravatar Yuri Kunde Schlesner2015-05-14 20:55:58 -0700
commita188e0fa574a9d8edc2d70aacf57af0f181cfbf3 (patch)
tree793f87fe3ad40b5c533e0ad2bce96d5bc76929da
parentMerge pull request #762 from yuriks/memmap (diff)
parentUpdated the appveyor build to no longer copy the QT dlls since it is done in ... (diff)
downloadyuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.tar.gz
yuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.tar.xz
yuzu-a188e0fa574a9d8edc2d70aacf57af0f181cfbf3.zip
Merge pull request #675 from jroweboy/windows-build-fixes
Windows build fixes
-rw-r--r--CMakeLists.txt23
-rw-r--r--appveyor.yml12
-rw-r--r--src/citra_qt/CMakeLists.txt36
3 files changed, 52 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc525aa3d..fc742317c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,25 +15,32 @@ else()
15 15
16 # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms) 16 # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
17 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) 17 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
18 set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo CACHE STRING "" FORCE)
18 19
19 # Tweak optimization settings 20 # Tweak optimization settings
20 # As far as I can tell, there's no way to override the CMake defaults while leaving user 21 # As far as I can tell, there's no way to override the CMake defaults while leaving user
21 # changes intact, so we'll just clobber everything and say sorry. 22 # changes intact, so we'll just clobber everything and say sorry.
22 message(STATUS "Cache compiler flags ignored, please edit CMakeLists.txt to change the flags.") 23 message(STATUS "Cache compiler flags ignored, please edit CMakeLists.txt to change the flags.")
23 # /MP - Multi-threaded compilation 24 # /O2 - Optimization level 2
24 # /MD - Multi-threaded runtime
25 # /Ox - Full optimization
26 # /Oy- - Don't omit frame pointer 25 # /Oy- - Don't omit frame pointer
27 # /GR- - Disable RTTI 26 # /GR- - Disable RTTI
28 # /GS- - No stack buffer overflow checks 27 # /GS- - No stack buffer overflow checks
29 # /EHsc - C++-only exception handling semantics 28 # /EHsc - C++-only exception handling semantics
30 set(optimization_flags "/MP /MD /Ox /Oy- /GR- /GS- /EHsc") 29 set(optimization_flags "/O2 /Oy- /GR- /GS- /EHsc")
30 # /MP - Multi-threaded compilation
31 # /Zi - Output debugging information 31 # /Zi - Output debugging information
32 # /Zo - enahnced debug info for optimized builds 32 # /Zo - enahnced debug info for optimized builds
33 set(CMAKE_C_FLAGS_RELEASE "${optimization_flags} /Zi" CACHE STRING "" FORCE) 33 # /MDd - Multi-threaded Debug Runtime DLL
34 set(CMAKE_CXX_FLAGS_RELEASE "${optimization_flags} /Zi" CACHE STRING "" FORCE) 34 set(CMAKE_C_FLAGS_DEBUG "/MP /MDd /Zi" CACHE STRING "" FORCE)
35 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) 35 set(CMAKE_CXX_FLAGS_DEBUG "/MP /MDd /Zi" CACHE STRING "" FORCE)
36 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${optimization_flags} /Zi /Zo" CACHE STRING "" FORCE) 36 # /MD - Multi-threaded runtime DLL
37 set(CMAKE_C_FLAGS_RELEASE "${optimization_flags} /MP /MD" CACHE STRING "" FORCE)
38 set(CMAKE_CXX_FLAGS_RELEASE "${optimization_flags} /MP /MD" CACHE STRING "" FORCE)
39 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${optimization_flags} /MP /MD /Zi /Zo" CACHE STRING "" FORCE)
40 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${optimization_flags} /MP /MD /Zi /Zo" CACHE STRING "" FORCE)
41
42 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE STRING "" FORCE)
43 set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG" CACHE STRING "" FORCE)
37endif() 44endif()
38 45
39add_definitions(-DSINGLETHREADED) 46add_definitions(-DSINGLETHREADED)
diff --git a/appveyor.yml b/appveyor.yml
index 7886b905b..f2b656729 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -25,17 +25,7 @@ before_build:
25 - cd .. 25 - cd ..
26 26
27after_build: 27after_build:
28 # copy the qt dlls 28 # copying the needed QT Dlls is now done post build. See the CMakeLists.txt file in the citra-qt folder
29 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icudt53.dll build\bin\release
30 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icuin53.dll build\bin\release
31 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\icuuc53.dll build\bin\release
32 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Core.dll build\bin\release
33 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Gui.dll build\bin\release
34 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5OpenGL.dll build\bin\release
35 - copy C:\Qt\5.4\msvc2013_64_opengl\bin\Qt5Widgets.dll build\bin\release
36 - mkdir build\bin\release\platforms\
37 - copy C:\Qt\5.4\msvc2013_64_opengl\plugins\platforms\qwindows.dll build\bin\release\platforms
38
39 - ps: > 29 - ps: >
40 if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master")) 30 if (!"$env:APPVEYOR_PULL_REQUEST_TITLE" -and ("$env:APPVEYOR_REPO_BRANCH" -eq "master"))
41 { 31 {
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})
74target_link_libraries(citra-qt ${PLATFORM_LIBRARIES}) 74target_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
78if (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)
112endif()