Browse Source

Fail build if wrong macOS target used, fix macOS AU (missing fftw)

tags/22.05
falkTX 1 month ago
parent
commit
ec7e6b231e
4 changed files with 18 additions and 3 deletions
  1. +3
    -3
      .github/workflows/build.yml
  2. +7
    -0
      deps/Makefile
  3. +3
    -0
      jucewrapper/CMakeLists.txt
  4. +5
    -0
      jucewrapper/CardinalWrapper.cpp

+ 3
- 3
.github/workflows/build.yml View File

@@ -4,7 +4,7 @@ on:
push:

env:
CACHE_VERSION: 23
CACHE_VERSION: 24
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1
LIBGL_ALWAYS_SOFTWARE: 'true'
@@ -451,7 +451,7 @@ jobs:
git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
sed -i -e 's/kAudioUnitProperty_SupportsMPE/kAudioUnitProperty_ignore_SupportsMPE/' jucewrapper/JUCE/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.h
mkdir -p jucewrapper/build
pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd
pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
- name: Build macOS intel (packaging)
run: |
@@ -539,7 +539,7 @@ jobs:
pushd deps/PawPaw; source local.env macos-universal; popd
git clone --depth=1 -b master https://github.com/juce-framework/JUCE.git jucewrapper/JUCE
mkdir -p jucewrapper/build
pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make -j $(sysctl -n hw.logicalcpu); popd
pushd jucewrapper/build; cmake -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 -j $(sysctl -n hw.logicalcpu); popd
mv jucewrapper/build/*_artefacts/Release/AU/*.component bin/
- name: Build macOS universal (packaging)
run: |


+ 7
- 0
deps/Makefile View File

@@ -99,12 +99,18 @@ CMAKE += -DCMAKE_INSTALL_PREFIX='$(DEP_PATH)'
CMAKE += -DBUILD_SHARED_LIBS=OFF

# make sure macOS target matches ours
ifeq ($(MACOS),true)
ifneq (,$(findstring -arch$(SPACE),$(CXXFLAGS)))
CMAKE += -DCMAKE_OSX_ARCHITECTURES='$(subst $(SPACE),;,$(subst -arch=,,$(filter -arch=%,$(subst -arch$(SPACE),-arch=,$(CXXFLAGS)))))'
else ifeq ($(CIBUILD),true)
$(error CI build requires -march flag on macOS)
endif
ifneq (,$(findstring -mmacosx-version-min=,$(CXXFLAGS)))
export MACOSX_DEPLOYMENT_TARGET = $(subst -mmacosx-version-min=,,$(filter -mmacosx-version-min=%,$(CXXFLAGS)))
CMAKE += -DCMAKE_OSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
else ifeq ($(CIBUILD),true)
$(error CI build requires -mmacosx-version-min flag on macOS)
endif
endif

# make sure debug/release matches
@@ -151,6 +157,7 @@ DEP_MAKE += CONFIGURE="$(CONFIGURE)"
DEP_MAKE += DEP_FLAGS="$(BASE_FLAGS)"
DEP_MAKE += DEP_MAC_SDK_FLAGS=
DEP_MAKE += MACHINE=$(MACHINE)$(MACHINE_SUFFIX)
DEP_MAKE += VERBOSE=1

ifeq ($(MACOS),true)
DEP_MAKE += SHA256SUM="shasum5.28 -a 256"


+ 3
- 0
jucewrapper/CMakeLists.txt View File

@@ -86,6 +86,7 @@ set_property(TARGET libzstd PROPERTY IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/..
# dependencies

find_package(PkgConfig REQUIRED)
pkg_check_modules(FFTW3F REQUIRED fftw3f)
pkg_check_modules(LIBLO REQUIRED liblo)
pkg_check_modules(SNDFILE REQUIRED sndfile)

@@ -181,6 +182,7 @@ target_link_libraries(CardinalFX
${GL_LIBRARIES}
${DBUS_LIBRARIES}
-L${LIBLO_LIBRARY_DIRS}
${FFTW3F_LIBRARIES}
${LIBLO_LIBRARIES}
${SNDFILE_LIBRARIES}
${X11_LIBRARIES}
@@ -269,6 +271,7 @@ target_link_libraries(CardinalSynth
${GL_LIBRARIES}
${DBUS_LIBRARIES}
-L${LIBLO_LIBRARY_DIRS}
${FFTW3F_LIBRARIES}
${LIBLO_LIBRARIES}
${SNDFILE_LIBRARIES}
${X11_LIBRARIES}


+ 5
- 0
jucewrapper/CardinalWrapper.cpp View File

@@ -17,6 +17,11 @@

#include <juce_audio_processors/juce_audio_processors.h>

#include <AvailabilityMacros.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED > 101200
#error unwanted macOS version, too new
#endif

#define createPlugin createStaticPlugin
#include "src/DistrhoPluginInternal.hpp"
#include "src/DistrhoUIInternal.hpp"


Loading…
Cancel
Save