Skip to content

Commit

Permalink
Update workflow and CMake config
Browse files Browse the repository at this point in the history
Minimum supported is CMake version 3.16 now
Drop fmt 5 support with debian 10, only retropie left
  • Loading branch information
carstene1ns committed Dec 31, 2023
1 parent 4f6d357 commit 4bc9cfb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/stable-compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
description: Git Ref (Optional)
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash
Expand All @@ -24,15 +28,14 @@ jobs:
fail-fast: false
matrix:
image:
- debian:10 # oldstable | CMake 3.13.4 | G++ 8.3.0 | SDL 2.0.9
- ubuntu:20.04 # LTS | CMake 3.16.3 | G++ 9.3.0 | SDL 2.0.10
- debian:11 # stable | CMake 3.18.4 | G++ 10.2.1 | SDL 2.0.14
- ubuntu:22.04 # LTS | CMake 3.22.1 | G++ 11.2.0 | SDL 2.0.20
# version of: # CMake | g++ | SDL | support end #
# -------------------------------------------------------------
- ubuntu:20.04 # 3.16.3 | 9.3.0 | 2.0.10 | LTS (4/25) #
- debian:11 # 3.18.4 | 10.2.1 | 2.0.14 | oldstable (8/24) #
- ubuntu:22.04 # 3.22.1 | 11.2.0 | 2.0.20 | LTS (6/27) #
- debian:12 # 3.25.1 | 12.2.0 | 2.26.5 | stable (6/26) #

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: Install dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
Expand All @@ -45,10 +48,10 @@ jobs:
libdrm-dev libgbm-dev # only needed for sdl2 on debian 11
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
if: github.event.inputs.git-ref == ''
- name: Clone Repository (with custom ref)
uses: actions/checkout@v2
uses: actions/checkout@v4
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
Expand All @@ -63,8 +66,7 @@ jobs:
- name: Install
run: |
# cmake < 3.16 does not support '--install'
cmake --build build --target install
cmake --install build
- name: Test
run: |
Expand Down
21 changes: 10 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13...3.24 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16...3.28 FATAL_ERROR)

project(EasyRPG_Player VERSION 0.8
DESCRIPTION "Interpreter for RPG Maker 2000/2003 games"
Expand All @@ -22,9 +22,7 @@ set(CMAKE_CXX_EXTENSIONS ON)
# Must be at global scope, otherwise breaks -DPLAYER_BUILD_LIBLCF (see CMP0077)
option(BUILD_SHARED_LIBS "Build shared easyrpg_libretro core" ON)

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15.0")
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Prefer config files over bundled FindXXX files. Set this to OFF when configuration fails and report a bug." ON)
endif()
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Prefer config files over bundled FindXXX files. Set this to OFF when configuration fails and report a bug." ON)

# Source Files
add_library(${PROJECT_NAME} OBJECT
Expand Down Expand Up @@ -740,8 +738,10 @@ endif()

if(NOT PLAYER_BUILD_EXECUTABLE AND BUILD_SHARED_LIBS)
# Need fPIC when compiling a shared library (e.g. libretro.so)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
include(CheckPIESupported)
check_pie_supported()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
endif()

if(ANDROID)
Expand All @@ -758,6 +758,7 @@ if(WIN32)
endif()

if(APPLE)
enable_language(OBJCXX)
target_sources(${PROJECT_NAME} PRIVATE
src/platform/macos/macos_utils.mm
src/platform/macos/macos_utils.h
Expand Down Expand Up @@ -911,11 +912,9 @@ if(${PLAYER_AUDIO_BACKEND} MATCHES "^(SDL2|SDL1|libretro|psvita|3ds|switch|wii|a
if(WIN32 OR APPLE)
set(SUPPORT_NATIVE_MIDI ON)
elseif(UNIX)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
find_package(ALSA)
if(ALSA_FOUND)
set(SUPPORT_NATIVE_MIDI ON)
endif()
find_package(ALSA)
if(ALSA_FOUND)
set(SUPPORT_NATIVE_MIDI ON)
endif()
endif()

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org
### minimal / required

- [liblcf] for RPG Maker data reading.
- SDL2 for screen backend support.
- SDL2 >= 2.0.5 for screen backend support.
- Pixman for low level pixel manipulation.
- libpng for PNG image support.
- zlib for XYZ image and ZIP archive support.
- fmtlib for text formatting and interal logging.
- fmtlib >= 6 for text formatting/coloring and interal logging.

### extended / recommended

Expand All @@ -36,7 +36,8 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org
- SpeexDSP or libsamplerate for proper audio resampling.
- lhasa for LHA (.lzh) archive support.

SDL 1.2 is still supported, but deprecated.
The older SDL version 1.2 is still supported, but deprecated.
Please do not add new platform code for this library.


## Daily builds
Expand Down
3 changes: 1 addition & 2 deletions src/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
#include <lcf/string_view.h>
#include <lcf/dbstring.h>
#include <fmt/core.h>

// Needed to allow building with fmt 5, older versions are untested.
#if FMT_VERSION < 60000
// Remove after 0.8.1 in 2024: allow building with fmt 5
# include <fmt/ostream.h>
#endif

Expand Down

0 comments on commit 4bc9cfb

Please sign in to comment.