diff options
| author | 2018-12-24 16:24:01 -0500 | |
|---|---|---|
| committer | 2018-12-28 15:32:39 -0500 | |
| commit | ef4c4e239da8e5771f61bf079eae25b28cbd0318 (patch) | |
| tree | c9d26a55a5ca150de64adf33ed14eb6cfcf1144f | |
| parent | main: Add main window integrations for QtWebBrowserApplet (diff) | |
| download | yuzu-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.sh | 4 | ||||
| -rwxr-xr-x | .travis/macos/build.sh | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | CMakeModules/CopyYuzuQt5Deps.cmake | 27 | ||||
| -rw-r--r-- | appveyor.yml | 2 |
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 | ||
| 3 | apt-get update | 3 | apt-get update |
| 4 | apt-get install --no-install-recommends -y build-essential git libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev wget cmake ninja-build ccache | 4 | apt-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 | ||
| 6 | cd /yuzu | 6 | cd /yuzu |
| 7 | 7 | ||
| 8 | mkdir build && cd build | 8 | mkdir build && cd build |
| 9 | cmake .. -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 | 9 | cmake .. -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 |
| 10 | ninja | 10 | ninja |
| 11 | 11 | ||
| 12 | ccache -s | 12 | ccache -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 | ||
| 10 | mkdir build && cd build | 10 | mkdir build && cd build |
| 11 | cmake --version | 11 | cmake --version |
| 12 | cmake .. -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 | 12 | cmake .. -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 |
| 13 | make -j4 | 13 | make -j4 |
| 14 | 14 | ||
| 15 | ccache -s | 15 | ccache -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 | ||
| 20 | option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON) | 20 | option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON) |
| 21 | 21 | ||
| 22 | option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) | ||
| 23 | |||
| 22 | option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) | 24 | option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) |
| 23 | 25 | ||
| 24 | option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) | 26 | option(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 () | ||
| 322 | endif() | 328 | endif() |
| 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 | } |