pcsx2/.github/workflows/scripts/linux/generate-cmake.sh

34 lines
972 B
Bash
Raw Normal View History

2020-10-17 00:09:15 +00:00
#!/bin/bash
set -e
if [ "${COMPILER}" = "gcc" ]; then
export CC=gcc
export CXX=g++
else
export CC=clang
export CXX=clang++
fi
2020-11-24 00:44:30 +00:00
if [ "${PLATFORM}" = x86 ]; then
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS"
TOOLCHAIN="cmake/linux-compiler-i386-multilib.cmake"
2020-10-17 00:09:15 +00:00
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DPACKAGE_MODE=TRUE \
-DDISABLE_ADVANCE_SIMD=TRUE \
-DCMAKE_INSTALL_LIBDIR="/tmp/" \
-DCMAKE_INSTALL_DATADIR="/tmp/" \
-DCMAKE_INSTALL_DOCDIR="/tmp/PCSX2" \
-DOpenGL_GL_PREFERENCE="LEGACY" \
-DOPENGL_opengl_LIBRARY="" \
-DXDG_STD=TRUE "${ADDITIONAL_CMAKE_ARGS}" \
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" \
-GNinja \
2020-10-17 00:09:15 +00:00
-B build