diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e41731d1b..3f150ade2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -36,6 +36,15 @@ endif() find_package(PkgConfig) +# homebrew does not support universal binaries, disable external deps if it is in use +if(APPLE) + find_program(HOMEBREW brew) + if (HOMEBREW) + set(PKGCONFIG_FOUND FALSE) + mark_as_advanced(PKGCONFIG_FOUND) + endif() +endif() + if(PKGCONFIG_FOUND) pkg_check_modules(FLUIDSYNTH IMPORTED_TARGET fluidsynth) pkg_check_modules(SNDFILE IMPORTED_TARGET sndfile) @@ -118,8 +127,9 @@ function(set_common_target_properties TARGET) POSITION_INDEPENDENT_CODE ON ) - if(APPLE AND NOT $ENV{HOMEBREW_NO_AUTO_UPDATE}) + if(APPLE) set_property(${TARGET} PROPERTY APPEND OSX_ARCHITECTURES arm64) + set_property(${TARGET} PROPERTY APPEND OSX_ARCHITECTURES x86_64) endif() endfunction() @@ -488,6 +498,7 @@ target_compile_definitions(carla-ysfx NSEEL_ATOF=ysfx_wdl_atof WDL_FFT_REALSIZE=8 WDL_LINEPARSE_ATOF=ysfx_wdl_atof + WDL_WIN32_UTF8_NO_UI_IMPL YSFX_API= YSFX_NO_GFX YSFX_NO_STANDARD_MUTEX @@ -495,9 +506,16 @@ target_compile_definitions(carla-ysfx $<$>:_FILE_OFFSET_BITS=64> ) +# NOTE ugly -U /U due to cmake not supporting `target_remove_definitions` +# see https://gitlab.kitware.com/cmake/cmake/-/issues/19796 + target_compile_options(carla-ysfx PRIVATE + $<$:-UUNICODE> + $<$:-U_UNICODE> $<$:/wd4297> + $<$:/UUNICODE> + $<$:/U_UNICODE> $<$:-Wno-extra> $<$:-Wno-ignored-attributes> $<$:-Wno-unused-function> diff --git a/source/frontend/pluginlist/pluginlistdialog.cpp b/source/frontend/pluginlist/pluginlistdialog.cpp index 39fd8eda1..8d3385052 100644 --- a/source/frontend/pluginlist/pluginlistdialog.cpp +++ b/source/frontend/pluginlist/pluginlistdialog.cpp @@ -939,11 +939,13 @@ struct PluginListDialog::Self { static_cast(ptr)->discoveryCallback(info, sha1sum); } - bool checkCacheCallback(const char* const filename, const char* const sha1sum) + bool checkCacheCallback(const char*, const char* const sha1sum) { if (sha1sum == nullptr) return false; + // TODO check filename + const QString key = QString("PluginCache/%1").arg(sha1sum); const QSafeSettings settings("falkTX", "CarlaDatabase2"); @@ -1085,6 +1087,7 @@ struct PluginListDialog::Self { } // fall-through case PLUGIN_SFZ: + default: // the end reAddPlugins(); return true; diff --git a/source/modules/ysfx/Makefile b/source/modules/ysfx/Makefile index eace67e44..faa4dc610 100644 --- a/source/modules/ysfx/Makefile +++ b/source/modules/ysfx/Makefile @@ -18,6 +18,7 @@ YSFX_FLAGS += -DEELSCRIPT_NO_LICE YSFX_FLAGS += -DNSEEL_ATOF=ysfx_wdl_atof YSFX_FLAGS += -DWDL_FFT_REALSIZE=8 YSFX_FLAGS += -DWDL_LINEPARSE_ATOF=ysfx_wdl_atof +YSFX_FLAGS += -DWDL_WIN32_UTF8_NO_UI_IMPL YSFX_FLAGS += -DYSFX_API= YSFX_FLAGS += -DYSFX_NO_STANDARD_MUTEX @@ -46,7 +47,7 @@ YSFX_FLAGS += -DEEL_TARGET_PORTABLE endif ifeq ($(WINDOWS),true) -YSFX_FLAGS += -DNOMINMAX +YSFX_FLAGS += -DNOMINMAX -UUNICODE -U_UNICODE else # Not compatible with MingGW YSFX_FLAGS += -D_FILE_OFFSET_BITS=64