Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows JACK support #5716

Merged
merged 9 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
37 changes: 21 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -97,15 +101,13 @@ 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)
SET(WANT_WINMM ON)
SET(BUNDLE_QT_TRANSLATIONS ON)
SET(LMMS_HAVE_WINMM TRUE)
SET(STATUS_ALSA "<not supported on this platform>")
SET(STATUS_JACK "<not supported on this platform>")
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
SET(STATUS_SOUNDIO "<disabled in this release>")
SET(STATUS_WINMM "OK")
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions plugins/vst_base/VstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
#include <QDomDocument>

#ifdef LMMS_BUILD_WIN32
# ifndef NOMINMAX
# define NOMINMAX
# endif

# include <windows.h>
# include <QLayout>
#endif
Expand Down
1 change: 1 addition & 0 deletions src/3rdparty/jack2
Submodule jack2 added at db76dd
2 changes: 1 addition & 1 deletion src/3rdparty/weakjack/weakjack
3 changes: 0 additions & 3 deletions src/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
#include <QTextStream>

#ifdef LMMS_BUILD_WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

Expand Down