Skip to content

Commit

Permalink
Merge branch 'master' into build-on-msvc-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-giddins committed Nov 5, 2023
2 parents 3cbf7b9 + d5f90b5 commit c7a4560
Show file tree
Hide file tree
Showing 170 changed files with 3,205 additions and 667 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
[submodule "plugins/CarlaBase/carla"]
path = plugins/CarlaBase/carla
url = https://github.com/falktx/carla
[submodule "plugins/Sid/resid"]
path = plugins/Sid/resid
url = https://github.com/simonowen/resid
[submodule "plugins/Sid/resid/resid"]
path = plugins/Sid/resid/resid
url = https://github.com/libsidplayfp/resid
[submodule "src/3rdparty/jack2"]
path = src/3rdparty/jack2
url = https://github.com/jackaudio/jack2
Expand Down
69 changes: 65 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0057 NEW)
# TODO: Keep CMP0074 but remove this condition when cmake 3.12+ is guaranteed
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
# Needed for the SWH Ladspa plugins. See below.
CMAKE_POLICY(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)
Expand Down Expand Up @@ -85,6 +86,7 @@ OPTION(WANT_SOUNDIO "Include libsoundio support" ON)
OPTION(WANT_SDL "Include SDL (Simple DirectMedia Layer) support" ON)
OPTION(WANT_SF2 "Include SoundFont2 player plugin" ON)
OPTION(WANT_GIG "Include GIG player plugin" ON)
option(WANT_SID "Include Sid instrument" ON)
OPTION(WANT_STK "Include Stk (Synthesis Toolkit) support" ON)
OPTION(WANT_SWH "Include Steve Harris's LADSPA plugins" ON)
OPTION(WANT_TAP "Include Tom's Audio Processing LADSPA plugins" ON)
Expand All @@ -93,6 +95,10 @@ OPTION(WANT_VST_32 "Include 32-bit VST support" ON)
OPTION(WANT_VST_64 "Include 64-bit VST support" ON)
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)
option(WANT_DEBUG_ASAN "Enable AddressSanitizer" OFF)
option(WANT_DEBUG_TSAN "Enable ThreadSanitizer" OFF)
option(WANT_DEBUG_MSAN "Enable MemorySanitizer" OFF)
option(WANT_DEBUG_UBSAN "Enable UndefinedBehaviorSanitizer" OFF)
OPTION(BUNDLE_QT_TRANSLATIONS "Install Qt translation files for LMMS" OFF)


Expand Down Expand Up @@ -215,6 +221,13 @@ CHECK_CXX_SOURCE_COMPILES(
LMMS_HAVE_SF_COMPLEVEL
)

# check for perl
if(LMMS_BUILD_APPLE)
# Prefer system perl over Homebrew, MacPorts, etc
set(Perl_ROOT "/usr/bin")
endif()
find_package(Perl)

IF(WANT_LV2)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(LV2 lv2)
Expand Down Expand Up @@ -353,6 +366,16 @@ IF(WANT_SDL AND NOT LMMS_HAVE_SDL2)
ENDIF()
ENDIF()

# check for Sid
if(WANT_SID)
if(PERL_FOUND)
set(LMMS_HAVE_SID TRUE)
set(STATUS_SID "OK")
else()
set(STATUS_SID "not found, please install perl if you require the Sid instrument")
endif()
endif()

# check for Stk
IF(WANT_STK)
FIND_PACKAGE(STK)
Expand Down Expand Up @@ -518,7 +541,11 @@ IF(WANT_SF2)
find_package(FluidSynth 1.1.0)
if(FluidSynth_FOUND)
SET(LMMS_HAVE_FLUIDSYNTH TRUE)
SET(STATUS_FLUIDSYNTH "OK")
if(FluidSynth_VERSION_STRING VERSION_GREATER_EQUAL 2)
set(STATUS_FLUIDSYNTH "OK")
else()
set(STATUS_FLUIDSYNTH "OK (FluidSynth version < 2: per-note panning unsupported)")
endif()
else()
SET(STATUS_FLUIDSYNTH "not found, libfluidsynth-dev (or similar)"
"is highly recommended")
Expand Down Expand Up @@ -629,7 +656,9 @@ else()
set(NOOP_COMMAND "${CMAKE_COMMAND}" "-E" "echo")
endif()
if(STRIP)
set(STRIP_COMMAND "$<IF:$<TARGET:Debug,RelWithDebInfo>,${NOOP_COMMAND},${STRIP}>")
# TODO CMake 3.19: Now that CONFIG generator expressions support testing for
# multiple configurations, combine the OR into a single CONFIG expression.
set(STRIP_COMMAND "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,${NOOP_COMMAND},${STRIP}>")
else()
set(STRIP_COMMAND "${NOOP_COMMAND}")
endif()
Expand Down Expand Up @@ -665,8 +694,36 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
ENDIF(WIN32)
elseif(MSVC)
# Use UTF-8 as the source and execution character set
add_compile_options("/utf-8")
ENDIF()

# add enabled sanitizers
function(add_sanitizer sanitizer supported_compilers want_flag status_flag)
if(${want_flag})
if(CMAKE_CXX_COMPILER_ID MATCHES "${supported_compilers}")
set("${status_flag}" "Enabled" PARENT_SCOPE)
string(REPLACE ";" " " additional_flags "${ARGN}")
# todo CMake 3.13: use add_compile_options/add_link_options instead
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
else()
set("${status_flag}" "Wanted but disabled due to unsupported compiler" PARENT_SCOPE)
endif()
else()
set("${status_flag}" "Disabled" PARENT_SCOPE)
endif()
endfunction()

add_sanitizer(address "GNU|Clang|MSVC" WANT_DEBUG_ASAN STATUS_DEBUG_ASAN)
add_sanitizer(thread "GNU|Clang" WANT_DEBUG_TSAN STATUS_DEBUG_TSAN)
add_sanitizer(memory "Clang" WANT_DEBUG_MSAN STATUS_DEBUG_MSAN -fno-omit-frame-pointer)
# UBSan does not link with vptr enabled due to a problem with references from PeakControllerEffect
# not being found by PeakController
add_sanitizer(undefined "GNU|Clang" WANT_DEBUG_UBSAN STATUS_DEBUG_UBSAN -fno-sanitize=vptr)


# use ccache
include(CompileCache)

Expand Down Expand Up @@ -735,7 +792,6 @@ ADD_CUSTOM_TARGET(uninstall
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake"
)


#
# display configuration information
#
Expand Down Expand Up @@ -787,6 +843,7 @@ MESSAGE(
"* ZynAddSubFX instrument : ${STATUS_ZYN}\n"
"* Carla Patchbay & Rack : ${STATUS_CARLA}\n"
"* SoundFont2 player : ${STATUS_FLUIDSYNTH}\n"
"* Sid instrument : ${STATUS_SID}\n"
"* Stk Mallets : ${STATUS_STK}\n"
"* VST-instrument hoster : ${STATUS_VST}\n"
"* VST-effect hoster : ${STATUS_VST}\n"
Expand All @@ -801,7 +858,11 @@ MESSAGE(
MESSAGE(
"Developer options\n"
"-----------------------------------------\n"
"* Debug FP exceptions : ${STATUS_DEBUG_FPE}\n"
"* Debug FP exceptions : ${STATUS_DEBUG_FPE}\n"
"* Debug using AddressSanitizer : ${STATUS_DEBUG_ASAN}\n"
"* Debug using ThreadSanitizer : ${STATUS_DEBUG_TSAN}\n"
"* Debug using MemorySanitizer : ${STATUS_DEBUG_MSAN}\n"
"* Debug using UBSanitizer : ${STATUS_DEBUG_UBSAN}\n"
)

MESSAGE(
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/bs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3677,7 +3677,7 @@ You can remove and move mixer channels in the context menu, which is accessed by
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="src/gui/instrument/InstrumentMidiIOView.cpp" line="213"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Ověřte si prosím, zda máte povolen zápis do souboru a do složky, ve které
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/eo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Asegúrate de tener permisos de escritura tanto del archivo como del directorio
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/eu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6641,7 +6641,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/fa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6645,7 +6645,7 @@ Veuillez vous assurez que vous avez les droits d&apos;écriture sur le fichier e
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6361,7 +6361,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/hi_IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/hu_HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6366,7 +6366,7 @@ Ellenőrizd, hogy rendelkezel-e a szükséges engedélyekkel és próbáld újra
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Pastikan Anda memiliki izin menulis ke file dan direktori yang berisi berkas ter
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6366,7 +6366,7 @@ Si prega di controllare i permessi di scrittura sul file e la cartella che lo co
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6364,7 +6364,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/ms_MY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6362,7 +6362,7 @@ Zorg ervoor dat u schrijfbevoegdheid heeft voor het bestand en voor de map die h
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/oc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,7 @@ Please make sure you have write permission to the file and the directory contain
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
2 changes: 1 addition & 1 deletion data/locale/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6646,7 +6646,7 @@ Upewnij się, że masz uprawnienia do zapisu do pliku i katalogu zawierającego
</message>
</context>
<context>
<name>InstrumentMiscView</name>
<name>InstrumentTuningView</name>
<message>
<location filename="../../src/gui/instrument/InstrumentMidiIOView.cpp" line="221"/>
<source>MASTER PITCH</source>
Expand Down
Loading

0 comments on commit c7a4560

Please sign in to comment.