[DO NOT MERGE] WIP
All checks were successful
eden-license / license-header (pull_request) Successful in 18s

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
This commit is contained in:
Caio Oliveira 2025-09-18 18:14:47 -03:00
parent 05a91aa06c
commit 746372c363
Signed by: DraVee
GPG key ID: 362DA3DC1901E080
3 changed files with 77 additions and 5 deletions

62
.ci/linux/build-qt.sh Normal file
View file

@ -0,0 +1,62 @@
#!/bin/bash -e
# SPDX-FileCopyrightText: 2025 eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
QT_VERSION="6.8.3"
QT_SRC_DIR="$HOME/qt-src-$QT_VERSION"
QT_BUILD_DIR="$HOME/qt-build-$QT_VERSION"
QT_INSTALL_DIR="$HOME/qt-clang-$QT_VERSION"
CLANG_BIN="/usr/bin/clang"
CLANGPP_BIN="/usr/bin/clang++"
if [ "${INSTALL_DEPS}" = "ON" ]; then
sudo apt-get update
sudo apt-get install -y build-essential perl python3 git \
"^libxcb.*" libx11-dev libx11-xcb-dev libxcb-xinerama0-dev \
libxcb-keysyms1-dev libxcb-icccm4-dev libxcb-image0-dev \
libxkbcommon-dev libxkbcommon-x11-dev libgl-dev libdbus-1-dev \
libasound2-dev libpulse-dev libudev-dev libfontconfig1-dev \
libcap-dev libssl-dev
fi
if [ ! -d "$QT_SRC_DIR" ]; then
mkdir -p "$QT_SRC_DIR"
cd "$QT_SRC_DIR"
wget https://download.qt.io/archive/qt/6.8/$QT_VERSION/single/qt-everywhere-src-$QT_VERSION.tar.xz
tar xf qt-everywhere-src-$QT_VERSION.tar.xz --strip-components=1
fi
mkdir -p "$QT_BUILD_DIR"
cd "$QT_BUILD_DIR"
"$QT_SRC_DIR/configure" \
-prefix "$QT_INSTALL_DIR" \
-opensource -confirm-license \
-nomake examples -nomake tests \
-no-pch \
-skip qt3d \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtgraphicaleffects \
-skip qtgamepad \
-skip qtquick3d \
-skip qtquicktimeline \
-skip qtx11extras \
-skip qtwebengine \
-skip qtgraphs \
-skip qtquick3dphysics \
-skip qtspeech \
-platform linux-clang \
-device-option CXX="$CLANGPP_BIN" \
-device-option CC="$CLANG_BIN" \
-release \
-force-debug-info \
"CFLAGS=-march=native -mtune=native -O3 -pipe" \
"CXXFLAGS=-march=native -mtune=native -O3 -pipe"
cmake --build . --parallel $(nproc)
cmake --install .

View file

@ -97,7 +97,7 @@ cmake .. -G Ninja \
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \
-DCMAKE_C_FLAGS="$ARCH_FLAGS" \
-DYUZU_USE_BUNDLED_QT=OFF \
-DYUZU_USE_BUNDLED_SDL2=OFF \
-DYUZU_USE_BUNDLED_SDL2=ON \
-DYUZU_USE_EXTERNAL_SDL2=ON \
-DYUZU_TESTS=OFF \
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \

View file

@ -137,11 +137,18 @@ if (PLATFORM_FREEBSD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()
# Cross Compile Options
if (MSVC OR ANDROID)
option(YUZU_PREFER_EXTERNAL "Prefer building 'external' system libraries instead of bundled libraries" ON)
endif()
# SDL2 / QT Frontend Options
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
cmake_dependent_option(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF)
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "ENABLE_SDL2;NOT MSVC" OFF)
cmake_dependent_option(ENABLE_SDL2 "Enable the SDL2 frontend" OFF "ANDROID" ON)
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
cmake_dependent_option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc.). Externals will still be fetched." OFF YUZU_PREFER_EXTERNAL ON)
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
@ -154,7 +161,7 @@ set(YUZU_QT_MIRROR "" CACHE STRING "Mirror URL for downloading bundled Qt librar
# Core Build Options
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc.). Externals will still be fetched." OFF)
cmake_dependent_option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc.). Externals will still be fetched." OFF YUZU_PREFER_EXTERNAL ON)
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
@ -199,8 +206,12 @@ endif()
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
if (YUZU_ENABLE_LTO)
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT COMPILER_SUPPORTS_LTO)
if(NOT COMPILER_SUPPORTS_LTO)
message(WARNING "LTO is not supported!")
endif()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${COMPILER_SUPPORTS_LTO})
endif()
@ -244,7 +255,6 @@ if (MSVC OR ANDROID)
set(YUZU_USE_EXTERNAL_SDL2 ON)
set(YUZU_USE_CPM ON)
set(YUZU_USE_BUNDLED_FFMPEG ON)
set(YUZU_USE_PRECOMPILED_HEADERS ON)
endif()
if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)