Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
fail-fast: false

matrix:
os: [ubuntu-latest, windows-2025]
build_type: [Release]
Expand All @@ -21,21 +21,27 @@ jobs:
- os: windows-2025
c_compiler: cl
cpp_compiler: cl

vcpkg_triplet: x64-windows
vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c

- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++

vcpkg_triplet: x64-linux
vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c

- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
vcpkg_triplet: x64-linux
vcpkg_commit_id: 1e199d32ad53aab1defda61ce41c380302e3f95c
exclude:
- os: windows-2025
c_compiler: gcc

- os: windows-2025
c_compiler: clang

- os: ubuntu-latest
c_compiler: cl

Expand All @@ -48,7 +54,26 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends xorg-dev libglu1-mesa-dev
sudo apt-get install -y --no-install-recommends \
autoconf autoconf-archive automake libtool libltdl-dev \
build-essential git make pkg-config cmake ninja-build \
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev \
libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev \
libxtst-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev \
libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev \
libudev-dev libthai-dev libpipewire-0.3-dev libwayland-dev \
libdecor-0-dev liburing-dev

- name: Setup vcpkg
id: runvcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgGitCommitId: '${{ matrix.vcpkg_commit_id }}'

- name: Install SDL3 via vcpkg
run: vcpkg install sdl3:${{ matrix.vcpkg_triplet }}

- name: Set reusable strings
id: strings
Expand All @@ -62,6 +87,8 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }}
-S ${{ github.workspace }}

- name: Build
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ option(BUILD_SHARED_LIBS "Build shared libs" ON)
# Dependencies
#

find_package(SDL3 REQUIRED)
find_package(SDL3 CONFIG REQUIRED)

include(3rdparty/imgui.cmake)
include(3rdparty/implot.cmake)

Expand Down
4 changes: 2 additions & 2 deletions src_demo/window_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

namespace Uni::GUI::Example {
bool WindowDemo::UiUpdate(UiApp& app) {
bool WindowDemo::UiUpdate(UiState& state) {
static bool win_about = false;
static bool win_demo = false;
static bool win_demo_implot = false;
Expand All @@ -24,7 +24,7 @@ namespace Uni::GUI::Example {
ImGui::SetNextWindowSize({800,600});
if (ImGui::Begin("demo"))
{
ImGui::Text(std::string(app.GetRenderingApiName()).c_str());
ImGui::Text("%s", std::string(state.app->GetRenderingApiName()).c_str());

if (ImGui::Button("About"))
{
Expand Down
2 changes: 1 addition & 1 deletion src_demo/window_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Uni::GUI::Example {
class WindowDemo: public Uni::GUI::UiElement {
public:
explicit WindowDemo() = default;
bool UiUpdate(UiApp&) override;
bool UiUpdate(UiState&) override;
};
}

Loading