Skip to content

Commit

Permalink
Merge branch 'fltk-upgrade'
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Oct 9, 2024
2 parents 1477f1f + d52a7d3 commit a4d8c66
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/linux/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -qq
sudo apt-get install g++-10 xvfb libasound2-dev libxpm-dev libpulse-dev libjack-dev libxft-dev libxrandr-dev libx11-dev libxinerama-dev libxcursor-dev libfontconfig1-dev
sudo apt-get install g++-10 xvfb libasound2-dev libxpm-dev libpulse-dev libjack-dev libxft-dev libxrandr-dev libx11-dev libxinerama-dev libxcursor-dev libfontconfig1-dev libgl-dev

# Symlink gcc in order to use the latest version

Expand Down
5 changes: 0 additions & 5 deletions .github/scripts/windows/install-deps.sh

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,17 @@ jobs:
# Windows --------------------------------------------------------------------
windows:
name: Windows
runs-on: windows-2019
runs-on: windows-2022
timeout-minutes: 60
steps:
- name: Download repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
shell: bash
run: bash ./.github/scripts/windows/install-deps.sh

- name: Generate Makefile
shell: bash
run: cmake -S . -B build/ -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DWITH_TESTS=ON -DWITH_VST3=ON
run: cmake -S . -B build/ -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DWITH_TESTS=ON -DWITH_VST3=ON

- name: Build
shell: bash
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,18 @@ jobs:
# Windows --------------------------------------------------------------------
windows:
name: Windows
runs-on: windows-2019
runs-on: windows-2022
timeout-minutes: 60
needs: create-release
steps:
- name: Download repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install dependencies
shell: bash
run: bash ./.github/scripts/windows/install-deps.sh

- name: Generate Makefile
shell: bash
run: cmake -S . -B build/ -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DWITH_VST3=ON
run: cmake -S . -B build/ -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DWITH_VST3=ON

- name: Build
shell: bash
Expand Down
45 changes: 13 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -547,38 +547,19 @@ list(APPEND INCLUDE_DIRS ${LIBRARY_RTMIDI_INCLUDE_DIR})

# FLTK

include (ExternalProject)
ExternalProject_Add(
fltk
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/deps/fltk
INSTALL_COMMAND "" # Don't install
CMAKE_ARGS
-DFLTK_BUILD_TEST=OFF
-DFLTK_BUILD_EXAMPLES=OFF
-DOPTION_BUILD_HTML_DOCUMENTATION=OFF
-DOPTION_BUILD_PDF_DOCUMENTATION=OFF
-DOPTION_USE_SYSTEM_ZLIB=OFF
-DOPTION_USE_WAYLAND=OFF
)
ExternalProject_Get_property(fltk BINARY_DIR)
ExternalProject_Get_property(fltk SOURCE_DIR)
list(APPEND INCLUDE_DIRS ${BINARY_DIR})
list(APPEND INCLUDE_DIRS ${SOURCE_DIR})
if(DEFINED OS_WINDOWS)
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/fltk_images$<$<CONFIG:Debug>:d>.lib")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/fltk$<$<CONFIG:Debug>:d>.lib")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/fltk_z$<$<CONFIG:Debug>:d>.lib")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/fltk_gl$<$<CONFIG:Debug>:d>.lib")
list(APPEND LIBRARIES gdiplus)
elseif (DEFINED OS_MACOS)
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/libfltk_images.a")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/libfltk.a")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>/libfltk_z.a")
else() # Linux and FreeBSD
list(APPEND LIBRARIES "${BINARY_DIR}/lib/libfltk_images.a")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/libfltk.a")
list(APPEND LIBRARIES "${BINARY_DIR}/lib/libfltk_z.a")
endif()
include (FetchContent)
FetchContent_Declare(
FLTK
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/deps/fltk)

set(FLTK_BUILD_GL ON CACHE BOOL "FLTK: enable OpenGL support")
set(FLTK_BUILD_TEST OFF CACHE BOOL "FLTK: don't build tests")
set(FLTK_BUILD_FLTK_OPTIONS OFF CACHE BOOL "FLTK: don't build 'options' editor")
set(FLTK_BUILD_FLUID OFF CACHE BOOL "FLTK: don't build FLUID")
set(FLTK_BUILD_FORMS OFF CACHE BOOL "FLTK: don't build (X)Forms compatibility library")

FetchContent_MakeAvailable(FLTK)
list(APPEND LIBRARIES fltk::fltk fltk::images)

# Libsndfile

Expand Down
6 changes: 6 additions & 0 deletions src/core/plugins/pluginHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@
#ifndef G_PLUGIN_HOST_H
#define G_PLUGIN_HOST_H

#include "core/const.h"
#include "core/types.h"
#include <functional>
/* windows.h, included somewhere, defines 'small' as a macro and it clashes with
some enum defined in the JUCE GUI module. */
#ifdef G_OS_WINDOWS
#undef small
#endif
#include <juce_audio_basics/juce_audio_basics.h>
#include <juce_gui_basics/juce_gui_basics.h>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/deps/fltk
Submodule fltk updated 565 files

0 comments on commit a4d8c66

Please sign in to comment.