aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-09-13 00:52:25 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-09-13 00:52:25 +0800
commit9fecb429a37bcaa577aaa972139f6db3ce17ac50 (patch)
tree046a2a47b6e5aa67ad65121387781a4ea191210c /qmidiplayer-desktop
parentaec5e972e8968255e8843eb22314b96a8f23b041 (diff)
downloadQMidiPlayer-9fecb429a37bcaa577aaa972139f6db3ce17ac50.tar.xz
CMake. It's happening.
Added a new build system based on CMake. Minor code cleanups. This probably breaks building with QMake on multiple platforms. And of course the new CMake support isn't tested thoroughly. But it's finally happening.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/CMakeLists.txt62
-rw-r--r--qmidiplayer-desktop/qmidiplayer-desktop.pro7
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp1
3 files changed, 62 insertions, 8 deletions
diff --git a/qmidiplayer-desktop/CMakeLists.txt b/qmidiplayer-desktop/CMakeLists.txt
new file mode 100644
index 0000000..1f40a2e
--- /dev/null
+++ b/qmidiplayer-desktop/CMakeLists.txt
@@ -0,0 +1,62 @@
+set(qmpdesktop_SOURCES
+ qdialskulpturestyle.hpp
+ qmpchanneleditor.hpp
+ qmpchannelswindow.hpp
+ qmpcustomizewindow.hpp
+ qmpdevpropdialog.hpp
+ qmpefxwindow.hpp
+ qmphelpwindow.hpp
+ qmpinfowindow.hpp
+ qmpmainwindow.hpp
+ qmpplistwindow.hpp
+ qmpplugin.hpp
+ qmppresetselect.hpp
+ qmpsettingswindow.hpp
+ main.cpp
+ qdialskulpturestyle.cpp
+ qmpchanneleditor.cpp
+ qmpchannelswindow.cpp
+ qmpcustomizewindow.cpp
+ qmpdevpropdialog.cpp
+ qmpefxwindow.cpp
+ qmphelpwindow.cpp
+ qmpinfowindow.cpp
+ qmpmainwindow.cpp
+ qmpplistwindow.cpp
+ qmpplugin.cpp
+ qmppresetselect.cpp
+ qmpsettingswindow.cpp
+ qmpchanneleditor.ui
+ qmpchannelswindow.ui
+ qmpcustomizewindow.ui
+ qmpdevpropdialog.ui
+ qmpefxwindow.ui
+ qmphelpwindow.ui
+ qmpinfowindow.ui
+ qmpmainwindow.ui
+ qmpplistwindow.ui
+ qmppresetselect.ui
+ qmpsettingswindow.ui
+ resources.qrc
+)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+include_directories(${fluidsynth_INCLUDE_DIRS})
+include_directories(${rtmidi_INCLUDE_DIRS})
+include_directories(${PROJECT_SOURCE_DIR}/include/)
+
+add_executable(qmidiplayer
+ ${qmpdesktop_SOURCES}
+)
+
+target_link_libraries(qmidiplayer
+ Qt5::Widgets
+ qmpcore
+ ${fluidsynth_LIBRARIES}
+ ${rtmidi_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${CMAKE_DL_LIBS}
+)
diff --git a/qmidiplayer-desktop/qmidiplayer-desktop.pro b/qmidiplayer-desktop/qmidiplayer-desktop.pro
index 193c0e5..53fc7c3 100644
--- a/qmidiplayer-desktop/qmidiplayer-desktop.pro
+++ b/qmidiplayer-desktop/qmidiplayer-desktop.pro
@@ -77,12 +77,6 @@ unix{
message(Building in packaging mode...)
DEFINES += QMP_BUILD_UNIX_PACKAGE
}
- exists("/usr/include/RtMidi.h") {
- DEFINES += RT_MIDI_H=\\\"/usr/include/RtMidi.h\\\"
- }
- exists("/usr/include/rtmidi/RtMidi.h") {
- DEFINES += RT_MIDI_H=\\\"/usr/include/rtmidi/RtMidi.h\\\"
- }
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_LFLAGS_RELEASE -= -O1
@@ -113,7 +107,6 @@ unix{
LIBS += -lfluidsynth -lrtmidi -ldl
}
win32{
- DEFINES += RT_MIDI_H=\\\"RtMidi.h\\\"
#change these before building...
LIBS += -lfluidsynth -lwinmm -lRtMidi
RC_FILE = qmidiplayer.rc
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 95b2da3..e097c62 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -118,7 +118,6 @@ void qmpMainWindow::init()
pmgr->scanPlugins();settingsw->updatePluginList(pmgr);pmgr->initPlugins();
ui->vsMasterVol->setValue(qmpSettingsWindow::getSettingsIntf()->value("Audio/Gain",50).toInt());
connect(timer,SIGNAL(timeout()),this,SLOT(updateWidgets()));
- connect(timer,SIGNAL(timeout()),chnlw,SLOT(channelWindowsUpdate()));
connect(timer,SIGNAL(timeout()),infow,SLOT(updateInfo()));
ui->pbNext->setIcon(QIcon(getThemedIcon(":/img/next.svg")));
ui->pbPrev->setIcon(QIcon(getThemedIcon(":/img/prev.svg")));