mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-22 23:04:40 +02:00
The portable build's own SDL was configured without XInput 2.1's scroll classes: SDL's check links a test program against the system root's libX11, whose libxcb the system root has not got, so the check failed. Built that way, SDL still drops the wheel's button events as emulated by XInput 2 but reads no scroll valuators, so under X11 the wheel sent nothing. CMake's checks now link with --allow-shlib-undefined, and tools/linux_sysroot.py requires SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO. (cherry picked from commit 311f02bb50d4a0d2ffaf372a474ca0e8e98168c6, without its 64-bit system root, which OpenCE does not have)
23 lines
1.2 KiB
CMake
23 lines
1.2 KiB
CMake
# CMake toolchain of the portable Linux build's SDL3 (tools/linux_build.py):
|
|
# clang for 32-bit x86, against the system root of tools/linux_sysroot.py,
|
|
# given as -DHALO_SYSROOT=<folder>. The libraries SDL finds there it loads
|
|
# when it starts (dlopen), by the names it reads from them.
|
|
set(CMAKE_SYSTEM_NAME Linux)
|
|
set(CMAKE_SYSTEM_PROCESSOR i686)
|
|
set(CMAKE_C_COMPILER_TARGET i686-linux-gnu)
|
|
set(CMAKE_SYSROOT "${HALO_SYSROOT}")
|
|
set(CMAKE_LIBRARY_ARCHITECTURE i386-linux-gnu)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${HALO_SYSROOT}")
|
|
set(ENV{PKG_CONFIG_LIBDIR} "${HALO_SYSROOT}/usr/lib/i386-linux-gnu/pkgconfig:${HALO_SYSROOT}/usr/share/pkgconfig")
|
|
set(ENV{PKG_CONFIG_PATH} "")
|
|
# (a program that a check links may use a library whose own libraries the
|
|
# system root has not got, as it has only what SDL's headers and dlopen
|
|
# names need: libX11's libxcb, in the check for XInput 2.1's scrolling)
|
|
set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--allow-shlib-undefined")
|
|
# (and in the projects CMake tries compiling in)
|
|
list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES HALO_SYSROOT)
|