diff --git a/.gitmodules b/.gitmodules index 5065883f18f..521b77c5824 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule "plugins/sid/resid"] path = plugins/Sid/resid url = https://github.com/simonowen/resid +[submodule "src/3rdparty/jack2"] + path = src/3rdparty/jack2 + url = https://github.com/jackaudio/jack2 diff --git a/CMakeLists.txt b/CMakeLists.txt index a3c83c1a4b6..43d7dd1523e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,10 @@ IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0057 NEW) ENDIF(COMMAND CMAKE_POLICY) + +# Import of windows.h breaks min()/max() +ADD_DEFINITIONS(-DNOMINMAX) + INCLUDE(PluginList) INCLUDE(CheckSubmodules) INCLUDE(AddFileDependencies) @@ -97,7 +101,6 @@ ENDIF(LMMS_BUILD_APPLE) IF(LMMS_BUILD_WIN32) SET(WANT_ALSA OFF) - SET(WANT_JACK OFF) SET(WANT_PULSEAUDIO OFF) SET(WANT_SNDIO OFF) SET(WANT_SOUNDIO OFF) @@ -105,7 +108,6 @@ IF(LMMS_BUILD_WIN32) SET(BUNDLE_QT_TRANSLATIONS ON) SET(LMMS_HAVE_WINMM TRUE) SET(STATUS_ALSA "") - SET(STATUS_JACK "") SET(STATUS_PULSEAUDIO "") SET(STATUS_SOUNDIO "") SET(STATUS_WINMM "OK") @@ -433,23 +435,26 @@ ENDIF(NOT LMMS_HAVE_ALSA) # check for JACK IF(WANT_JACK) - PKG_CHECK_MODULES(JACK jack>=0.77) - IF(JACK_FOUND) - IF(WANT_WEAKJACK) - SET(LMMS_HAVE_WEAKJACK TRUE) - SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack) - SET(STATUS_JACK "OK (weak linking enabled)") - # use dlsym instead - SET(JACK_LIBRARIES ${CMAKE_DL_LIBS}) - ELSE() + IF(WANT_WEAKJACK) + SET(LMMS_HAVE_WEAKJACK TRUE) + SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack) + SET(JACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/jack2/common) + SET(STATUS_JACK "OK (weak linking enabled)") + # use dlsym instead + SET(JACK_LIBRARIES ${CMAKE_DL_LIBS}) + SET(LMMS_HAVE_JACK TRUE) + SET(JACK_FOUND TRUE) + ELSE() + PKG_CHECK_MODULES(JACK jack>=0.77) + IF(JACK_FOUND) SET(STATUS_JACK "OK") ENDIF() - SET(LMMS_HAVE_JACK TRUE) - ELSE(JACK_FOUND) + ENDIF() + + IF(NOT JACK_FOUND) SET(JACK_INCLUDE_DIRS "") - SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) " - "if you require JACK support") - ENDIF(JACK_FOUND) + SET(STATUS_JACK "not found") + ENDIF() ENDIF(WANT_JACK) # check for FFTW3F-library diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 278ab8b2d71..a08ef072d5e 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -46,10 +46,6 @@ #include #ifdef LMMS_BUILD_WIN32 -# ifndef NOMINMAX -# define NOMINMAX -# endif - # include # include #endif diff --git a/src/3rdparty/jack2 b/src/3rdparty/jack2 new file mode 160000 index 00000000000..db76dd6bb87 --- /dev/null +++ b/src/3rdparty/jack2 @@ -0,0 +1 @@ +Subproject commit db76dd6bb879a0a24d73ec41cc2e6a21bca8ee08 diff --git a/src/3rdparty/weakjack/weakjack b/src/3rdparty/weakjack/weakjack index cbb05c52561..fd11655be3b 160000 --- a/src/3rdparty/weakjack/weakjack +++ b/src/3rdparty/weakjack/weakjack @@ -1 +1 @@ -Subproject commit cbb05c52561d921885ad6651af6c8dd9f514dc9a +Subproject commit fd11655be3b2efd6082968ecfe53f9cfe88bda2b diff --git a/src/core/main.cpp b/src/core/main.cpp index 7c56b90d2cd..ee72da8d92f 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -40,9 +40,6 @@ #include #ifdef LMMS_BUILD_WIN32 -#ifndef NOMINMAX -#define NOMINMAX -#endif #include #endif