diff --git a/.github/scripts/linux/install-deps.sh b/.github/scripts/linux/install-deps.sh index fb8aa69a4..6f4749365 100755 --- a/.github/scripts/linux/install-deps.sh +++ b/.github/scripts/linux/install-deps.sh @@ -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 diff --git a/.github/scripts/windows/install-deps.sh b/.github/scripts/windows/install-deps.sh deleted file mode 100644 index 048ac6e96..000000000 --- a/.github/scripts/windows/install-deps.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -# Install Visual Studio 2019 build tools - -choco install -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c804a7a54..324a10acb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: # Windows -------------------------------------------------------------------- windows: name: Windows - runs-on: windows-2019 + runs-on: windows-2022 timeout-minutes: 60 steps: - name: Download repository @@ -39,13 +39,9 @@ jobs: 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 diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 5fc8ceddc..922277085 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -67,7 +67,7 @@ jobs: # Windows -------------------------------------------------------------------- windows: name: Windows - runs-on: windows-2019 + runs-on: windows-2022 timeout-minutes: 60 needs: create-release steps: @@ -75,14 +75,10 @@ jobs: 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index b43fbf811..0e4a0bbc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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/$<$:Debug>$<$:Release>/fltk_images$<$:d>.lib") - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$:Release>/fltk$<$:d>.lib") - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$:Release>/fltk_z$<$:d>.lib") - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$:Release>/fltk_gl$<$:d>.lib") - list(APPEND LIBRARIES gdiplus) -elseif (DEFINED OS_MACOS) - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$:Release>/libfltk_images.a") - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$:Release>/libfltk.a") - list(APPEND LIBRARIES "${BINARY_DIR}/lib/$<$:Debug>$<$: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 diff --git a/src/core/plugins/pluginHost.h b/src/core/plugins/pluginHost.h index 23830bb20..2bf36c20d 100644 --- a/src/core/plugins/pluginHost.h +++ b/src/core/plugins/pluginHost.h @@ -27,8 +27,14 @@ #ifndef G_PLUGIN_HOST_H #define G_PLUGIN_HOST_H +#include "core/const.h" #include "core/types.h" #include +/* 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 #include #include diff --git a/src/deps/fltk b/src/deps/fltk index d963dde3e..81d3ccefa 160000 --- a/src/deps/fltk +++ b/src/deps/fltk @@ -1 +1 @@ -Subproject commit d963dde3efc1fdf4935534f97d76c68eb269b713 +Subproject commit 81d3ccefa4b6c3cbaeab20231b2c39705dfb3fb8