Skip to content

Commit

Permalink
Jamulus.pro: Improve JACK/ASIO distinction on Windows
Browse files Browse the repository at this point in the history
Also ensure (for license reasons) that we don't include ASIO headers on
JACK builds.

Related: jamulussoftware#2417
  • Loading branch information
hoffie committed Mar 1, 2022
1 parent 259545f commit f4f8acc
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,7 @@ DEFINES += QT_NO_DEPRECATED_WARNINGS
win32 {
DEFINES -= UNICODE # fixes issue with ASIO SDK (asiolist.cpp is not unicode compatible)
DEFINES += NOMINMAX # solves a compiler error in qdatetime.h (Qt5)
HEADERS += windows/sound.h
SOURCES += windows/sound.cpp \
windows/ASIOSDK2/common/asio.cpp \
windows/ASIOSDK2/host/asiodrivers.cpp \
windows/ASIOSDK2/host/pc/asiolist.cpp
RC_FILE = windows/mainicon.rc
INCLUDEPATH += windows/ASIOSDK2/common \
windows/ASIOSDK2/host \
windows/ASIOSDK2/host/pc
mingw* {
LIBS += -lole32 \
-luser32 \
Expand All @@ -92,8 +84,8 @@ win32 {
ws2_32.lib
}

# replace ASIO with jack if requested
contains(CONFIG, "jackonwindows") {
message(Using JACK.)
contains(QT_ARCH, "i386") {
exists("C:/Program Files (x86)") {
message("Cross compilation build")
Expand All @@ -112,15 +104,25 @@ win32 {
message("Warning: jack.h was not found in the expected location ($${programfilesdir}). Ensure that the right JACK2 variant is installed (32bit vs. 64bit).")
}

HEADERS -= windows/sound.h
SOURCES -= windows/sound.cpp
HEADERS += linux/sound.h
SOURCES += linux/sound.cpp
DEFINES += WITH_JACK
DEFINES += JACK_REPLACES_ASIO
DEFINES += _STDINT_H # supposed to solve compilation error in systemdeps.h
INCLUDEPATH += "$${programfilesdir}/JACK2/include"
LIBS += "$${programfilesdir}/JACK2/lib/$${libjackname}"
} else {
message(Using ASIO.)

# Important: Keep those ASIO includes local to this build in order to avoid poisoning other builds license-wise.
HEADERS += windows/sound.h
SOURCES += windows/sound.cpp \
windows/ASIOSDK2/common/asio.cpp \
windows/ASIOSDK2/host/asiodrivers.cpp \
windows/ASIOSDK2/host/pc/asiolist.cpp
INCLUDEPATH += windows/ASIOSDK2/common \
windows/ASIOSDK2/host \
windows/ASIOSDK2/host/pc
}

} else:macx {
Expand Down

0 comments on commit f4f8acc

Please sign in to comment.