Browse Source

More cmake tweaks, fix some minor warnings

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
199f27f73a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 25 additions and 3 deletions
  1. +19
    -1
      cmake/CMakeLists.txt
  2. +4
    -1
      source/frontend/pluginlist/pluginlistdialog.cpp
  3. +2
    -1
      source/modules/ysfx/Makefile

+ 19
- 1
cmake/CMakeLists.txt View File

@@ -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
$<$<NOT:$<BOOL:${MINGW}>>:_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
$<$<BOOL:${MINGW}>:-UUNICODE>
$<$<BOOL:${MINGW}>:-U_UNICODE>
$<$<BOOL:${MSVC}>:/wd4297>
$<$<BOOL:${MSVC}>:/UUNICODE>
$<$<BOOL:${MSVC}>:/U_UNICODE>
$<$<C_COMPILER_ID:GNU>:-Wno-extra>
$<$<C_COMPILER_ID:GNU>:-Wno-ignored-attributes>
$<$<C_COMPILER_ID:GNU>:-Wno-unused-function>


+ 4
- 1
source/frontend/pluginlist/pluginlistdialog.cpp View File

@@ -939,11 +939,13 @@ struct PluginListDialog::Self {
static_cast<PluginListDialog::Self*>(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;


+ 2
- 1
source/modules/ysfx/Makefile View File

@@ -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


Loading…
Cancel
Save