-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CMakePresets.json file to make building Player much easier #2878
Conversation
Should add some "generated" tag for the presets file: Line 22 in 9ee72af
|
wow these CMake config files are also a shitshow. SDL2 Builds on debian 10 and ubuntu 20.04 but fails on debian 11 and ubuntu 22.04 o_O |
8e1ead9
to
c1a573c
Compare
I don't really like the (On command line you can obviously do "-DPLAYER_BUILD_LIBLCF=ON" but not in VsCode ^^') |
hm looking through the VsCode documentation of the presets it states that This seems to also work for the command line invocation. That means I can use "Multi presets" would be cool. Then one could do stuff like |
Confirmed working after merging EasyRPG/buildscripts#142 Test script #!/bin/bash
set -e
export EASYRPG_BUILDSCRIPTS=$PWD/easyrpg-buildscripts
cd easyrpg-player
# Native
echo "=== Native ==="
cmake . -GNinja --preset debug
cmake --build --preset debug
# Linux
echo "=== Linux ==="
cmake . -GNinja --preset linux-debug
cmake --build --preset linux-debug
cmake . -GNinja --preset linux-libretro-debug
cmake --build --preset linux-libretro-debug
# Vita
echo "=== Vita ==="
cmake . -GNinja --preset psvita-debug
cmake --build --preset psvita-debug
cmake . -GNinja --preset psvita-libretro-debug
cmake --build --preset psvita-libretro-debug
# 3DS
echo "=== 3ds ==="
cmake . -GNinja --preset 3ds-debug
cmake --build --preset 3ds-debug
cmake . -GNinja --preset 3ds-libretro-debug
cmake --build --preset 3ds-libretro-debug
# Wii
echo "=== Wii ==="
cmake . -GNinja --preset wii-debug
cmake --build --preset wii-debug
cmake . -GNinja --preset wii-libretro-debug
cmake --build --preset wii-libretro-debug
# Switch
echo "=== Switch ==="
cmake . -GNinja --preset switch-debug
cmake --build --preset switch-debug
cmake . -GNinja --preset switch-libretro-debug
cmake --build --preset switch-libretro-debug
# emscripten
echo "=== Emscripten ==="
cmake . -GNinja --preset emscripten-debug
cmake --build --preset emscripten-debug |
How does cmake handle missing preset files? Reason is I would provide the user file as |
When you ask something about CMakePresets the answer is usually "no". Officially they are now on version 6 and it is still barely usable for anything that is not trivial. Version 6 added "workflow presets" and there are already bug reports about them because they have the same combinatorical problems like the other features. They just don't care. See also:
Missing includes break the preset feature completely. The file must exist.
The official way to provide user overrides is through Oh and when two presets have the same name you get an error -_- See also: https://gitlab.kitware.com/cmake/cmake/-/issues/23046 This |
Okay, so best option for me is to use the env var and leave the file alone. |
Jenkins: Test this please |
All the targets were updated to reflect the upstream targets. As fallback still provide FindModules.
Is enforced by devkitPro, now we use it for everything. Hopefully this does not break the build.
Add missing "configuration" field to buildPresets
…LAYER_BUILD_LIBLCF=ON Fix build type Remove VS2019 (Cmake too old) Disable Windows in general (untested until VS2022 update)
Fixes macOS libretro linker errors
…y pixman on Android does work properly inside function calls
Initial version of the CMakePresets.json.
This makes configuring with CMake a bit easier because you can omit some of the verbose commands ;).
Also created a python script because of combinatorics... The resulting file is imo a bit ugly (More than 2000 lines (!)) due to limitations in the presets format.
Following environment variables are required (except for the "system environment" presets)
EASYRPG_BUILDSCRIPTS
: Path to easyrpg buildscripts repositoryDEVKITPRO
: (dkp only) Path to devkitPro installIf you do not want to provide them look in
builds/cmake/CMakePresetsUser.json
. This file provides an extension point :).Example usage: To create a Release (With Debug symbols) build for 3DS that builds liblcf do:
The output folder will be
build/3ds-relwithdebinfo
. This can be changed as usual with-B
. Additional parameters can be added as usual with-D
. So if you do not like a default it can still be changed.To create a visual studio 2022 solution for x64 windows that does not build liblcf but a libretro core in debug mode:
How VSCode represents it when loading the folder. So you can just open it in VsCode or any other tool that supports presets and are good to go :).
Note: Windows stuff is omitted on non-Windows systems.