Skip to content

Commit

Permalink
Reenable emscripten demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Apr 21, 2024
1 parent 8de025a commit 0e9241a
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 62 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Emscripten

on:
push:
branches: [main]
pull_request:
branches: [main]

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

env:
CMAKE_GENERATOR: Ninja

jobs:
build:
name: Emscripten
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build cmake
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
version: latest

- name: CMake configure
run: emcmake cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release

- name: Build & Test
run: cmake --build cmake-build-emscripten
52 changes: 0 additions & 52 deletions .github/workflows_disabled/emscripten.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
[![macOS](https://github.com/tobanteAudio/clap-examples/actions/workflows/macos.yml/badge.svg)](https://github.com/tobanteAudio/clap-examples/actions/workflows/macos.yml)
[![Windows](https://github.com/tobanteAudio/clap-examples/actions/workflows/windows.yml/badge.svg)](https://github.com/tobanteAudio/clap-examples/actions/workflows/windows.yml)
[![Linux](https://github.com/tobanteAudio/clap-examples/actions/workflows/linux.yml/badge.svg)](https://github.com/tobanteAudio/clap-examples/actions/workflows/linux.yml)
[![Emscripten](https://github.com/tobanteAudio/clap-examples/actions/workflows/emscripten.yml/badge.svg)](https://github.com/tobanteAudio/clap-examples/actions/workflows/emscripten.yml)
6 changes: 2 additions & 4 deletions example/app-emscripten/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
cmake_minimum_required(VERSION 3.21)
project(app-sdl2-imgui-emscripten)

find_package(imgui REQUIRED)

add_executable(app-sdl2-imgui-emscripten
main.cpp

${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_sdl.h
${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_sdl.cpp
${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_sdl2.h
${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_sdl2.cpp
${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_opengl3.h
${CMAKE_SOURCE_DIR}/external/imgui/backends/imgui_impl_opengl3.cpp
)
Expand Down
4 changes: 2 additions & 2 deletions example/app-emscripten/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// clang-format off
#include "imgui.h"
#include "bindings/imgui_impl_sdl.h"
#include "bindings/imgui_impl_opengl3.h"
#include "imgui_impl_sdl2.h"
#include "imgui_impl_opengl3.h"
#include <SDL.h>
#include <SDL_opengles2.h>
// clang-format on
Expand Down
4 changes: 2 additions & 2 deletions example/app-glfw-imgui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <iostream>
#include <vector>

#include "bindings/imgui_impl_glfw.h"
#include "bindings/imgui_impl_opengl3.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include "file_manager.h"
#include "imgui.h"
#include "opengl_shader.h"
Expand Down
4 changes: 2 additions & 2 deletions example/plugin-imgui/src/imgui_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// plugin implementations should not need to touch this file.

#include "audio_plugin.hpp"
#include "bindings/imgui_impl_glfw.h"
#include "bindings/imgui_impl_opengl3.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include "imgui_internal.h" // so we can get the viewport associated with an ImGui window
#include <GLFW/glfw3.h>

Expand Down

0 comments on commit 0e9241a

Please sign in to comment.