mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-04-02 10:52:54 -04:00
- Remove unused build options - Disable setcap by default Applications should not need to call sudo as part of the build process. - Rename XDG_STD to USE_LEGACY_USER_DIRECTORY By default, we use ~/.config/PCSX2 now. - Default Wayland support to on I don't think there's any systems worth supporting that don't have it. - Rework "install" logic Linux no longer installs to GIT_ROOT/bin, it builds direct to BUILD/bin. Saves a file copy, and running make install before running your developer build was always silly. - Don't require install target to build appimage AppImage creator now just adds the entire bin directory as-is. Everything needed is in there.
38 lines
1 KiB
Bash
Executable file
38 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [ "${COMPILER}" = "clang" ]; then
|
|
echo "Using clang toolchain"
|
|
cat > "$HOME/clang-toolchain.cmake" << EOF
|
|
set(CMAKE_C_COMPILER /usr/bin/clang-12)
|
|
set(CMAKE_CXX_COMPILER /usr/bin/clang++-12)
|
|
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
EOF
|
|
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=$HOME/clang-toolchain.cmake"
|
|
fi
|
|
|
|
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
|
|
|
|
# Generate CMake into ./build
|
|
# DISABLE_ADVANCE_SIMD is needed otherwise we end up doing -march=native.
|
|
|
|
# shellcheck disable=SC2086
|
|
cmake \
|
|
-B build \
|
|
-G Ninja \
|
|
$ADDITIONAL_CMAKE_ARGS \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DQT_BUILD=ON \
|
|
-DCUBEB_API=ON \
|
|
-DX11_API=ON \
|
|
-DWAYLAND_API=ON \
|
|
-DENABLE_SETCAP=OFF \
|
|
-DCMAKE_PREFIX_PATH="$HOME/deps" \
|
|
-DUSE_SYSTEM_SDL2=ON \
|
|
-DUSE_SYSTEM_ZSTD=OFF \
|
|
-DDISABLE_ADVANCE_SIMD=TRUE
|
|
|