summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-12-24 16:24:01 -0500
committerGravatar Zach Hilman2018-12-28 15:32:39 -0500
commitef4c4e239da8e5771f61bf079eae25b28cbd0318 (patch)
treec9d26a55a5ca150de64adf33ed14eb6cfcf1144f
parentmain: Add main window integrations for QtWebBrowserApplet (diff)
downloadyuzu-ef4c4e239da8e5771f61bf079eae25b28cbd0318.tar.gz
yuzu-ef4c4e239da8e5771f61bf079eae25b28cbd0318.tar.xz
yuzu-ef4c4e239da8e5771f61bf079eae25b28cbd0318.zip
cmake: Add USE_QT_WEB_ENGINE flag and update build system
-rwxr-xr-x.travis/linux/docker.sh4
-rwxr-xr-x.travis/macos/build.sh2
-rw-r--r--CMakeLists.txt6
-rw-r--r--CMakeModules/CopyYuzuQt5Deps.cmake27
-rw-r--r--appveyor.yml2
5 files changed, 37 insertions, 4 deletions
diff --git a/.travis/linux/docker.sh b/.travis/linux/docker.sh
index 4fe3326f9..ec2cd0874 100755
--- a/.travis/linux/docker.sh
+++ b/.travis/linux/docker.sh
@@ -1,12 +1,12 @@
1#!/bin/bash -ex 1#!/bin/bash -ex
2 2
3apt-get update 3apt-get update
4apt-get install --no-install-recommends -y build-essential git libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev wget cmake ninja-build ccache 4apt-get install --no-install-recommends -y build-essential git libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev libqt5webengine5 wget cmake ninja-build ccache
5 5
6cd /yuzu 6cd /yuzu
7 7
8mkdir build && cd build 8mkdir build && cd build
9cmake .. -DYUZU_USE_BUNDLED_UNICORN=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -G Ninja 9cmake .. -DYUZU_USE_BUNDLED_UNICORN=ON -DYUZU_USE_QT_WEB_ENGINE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -G Ninja
10ninja 10ninja
11 11
12ccache -s 12ccache -s
diff --git a/.travis/macos/build.sh b/.travis/macos/build.sh
index dce12099b..4a14837fc 100755
--- a/.travis/macos/build.sh
+++ b/.travis/macos/build.sh
@@ -9,7 +9,7 @@ export PATH="/usr/local/opt/ccache/libexec:$PATH"
9 9
10mkdir build && cd build 10mkdir build && cd build
11cmake --version 11cmake --version
12cmake .. -DYUZU_USE_BUNDLED_UNICORN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DUSE_DISCORD_PRESENCE=ON 12cmake .. -DYUZU_USE_BUNDLED_UNICORN=ON -DYUZU_USE_QT_WEB_ENGINE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DUSE_DISCORD_PRESENCE=ON
13make -j4 13make -j4
14 14
15ccache -s 15ccache -s
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f71f9fd9..f8635d91f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,8 @@ option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
19 19
20option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON) 20option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON)
21 21
22option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
23
22option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) 24option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
23 25
24option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) 26option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
@@ -319,6 +321,10 @@ if (ENABLE_QT)
319 endif() 321 endif()
320 322
321 find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT}) 323 find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT})
324
325 if (YUZU_USE_QT_WEB_ENGINE)
326 find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets ${QT_PREFIX_HINT})
327 endif ()
322endif() 328endif()
323 329
324# Platform-specific library requirements 330# Platform-specific library requirements
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake
index aaf80b77b..a1ad8d8fb 100644
--- a/CMakeModules/CopyYuzuQt5Deps.cmake
+++ b/CMakeModules/CopyYuzuQt5Deps.cmake
@@ -5,18 +5,45 @@ function(copy_yuzu_Qt5_deps target_dir)
5 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/") 5 set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
6 set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/") 6 set(Qt5_STYLES_DIR "${Qt5_DIR}/../../../plugins/styles/")
7 set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/") 7 set(Qt5_IMAGEFORMATS_DIR "${Qt5_DIR}/../../../plugins/imageformats/")
8 set(Qt5_RESOURCES_DIR "${Qt5_DIR}/../../../resources/")
8 set(PLATFORMS ${DLL_DEST}platforms/) 9 set(PLATFORMS ${DLL_DEST}platforms/)
9 set(STYLES ${DLL_DEST}styles/) 10 set(STYLES ${DLL_DEST}styles/)
10 set(IMAGEFORMATS ${DLL_DEST}imageformats/) 11 set(IMAGEFORMATS ${DLL_DEST}imageformats/)
12 set(RESOURCES ${DLL_DEST}resources/)
11 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} 13 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
12 icudt*.dll 14 icudt*.dll
13 icuin*.dll 15 icuin*.dll
14 icuuc*.dll 16 icuuc*.dll
15 Qt5Core$<$<CONFIG:Debug>:d>.* 17 Qt5Core$<$<CONFIG:Debug>:d>.*
16 Qt5Gui$<$<CONFIG:Debug>:d>.* 18 Qt5Gui$<$<CONFIG:Debug>:d>.*
19 Qt5Network$<$<CONFIG:Debug>:d>.*
17 Qt5OpenGL$<$<CONFIG:Debug>:d>.* 20 Qt5OpenGL$<$<CONFIG:Debug>:d>.*
18 Qt5Widgets$<$<CONFIG:Debug>:d>.* 21 Qt5Widgets$<$<CONFIG:Debug>:d>.*
19 ) 22 )
23
24 if (YUZU_USE_QT_WEB_ENGINE)
25 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
26 Qt5Positioning$<$<CONFIG:Debug>:d>.*
27 Qt5PrintSupport$<$<CONFIG:Debug>:d>.*
28 Qt5Qml$<$<CONFIG:Debug>:d>.*
29 Qt5Quick$<$<CONFIG:Debug>:d>.*
30 Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
31 Qt5WebChannel$<$<CONFIG:Debug>:d>.*
32 Qt5WebEngine$<$<CONFIG:Debug>:d>.*
33 Qt5WebEngineCore$<$<CONFIG:Debug>:d>.*
34 Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.*
35 QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
36 )
37
38 windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${RESOURCES}
39 qtwebengine_resources.pak
40 qtwebengine_devtools_resources.pak
41 qtwebengine_resources_100p.pak
42 qtwebengine_resources_200p.pak
43 icudtl.dat
44 )
45 endif ()
46
20 windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*) 47 windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
21 windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*) 48 windows_copy_files(yuzu ${Qt5_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
22 windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} qjpeg$<$<CONFIG:Debug>:d>.*) 49 windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS} qjpeg$<$<CONFIG:Debug>:d>.*)
diff --git a/appveyor.yml b/appveyor.yml
index d6a69fbc2..0e40336df 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -42,7 +42,7 @@ before_build:
42 $COMPAT = if ($env:ENABLE_COMPATIBILITY_REPORTING -eq $null) {0} else {$env:ENABLE_COMPATIBILITY_REPORTING} 42 $COMPAT = if ($env:ENABLE_COMPATIBILITY_REPORTING -eq $null) {0} else {$env:ENABLE_COMPATIBILITY_REPORTING}
43 if ($env:BUILD_TYPE -eq 'msvc') { 43 if ($env:BUILD_TYPE -eq 'msvc') {
44 # redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning 44 # redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
45 cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_BUNDLED_UNICORN=1 -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON .. 2>&1 && exit 0' 45 cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_BUNDLED_UNICORN=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON .. 2>&1 && exit 0'
46 } else { 46 } else {
47 C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DYUZU_BUILD_UNICORN=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON .. 2>&1" 47 C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DYUZU_BUILD_UNICORN=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DUSE_DISCORD_PRESENCE=ON .. 2>&1"
48 } 48 }