aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
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 /CMakeLists.txt
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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..92ba7f7
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.10.0)
+
+project(QMidiPlayer C CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
+include(FindPkgConfig)
+find_package(Qt5 COMPONENTS Widgets REQUIRED)
+find_package(Threads REQUIRED)
+pkg_search_module(fluidsynth REQUIRED fluidsynth>=2.0.0)
+pkg_search_module(rtmidi REQUIRED rtmidi)
+
+option(BUILD_VISUALIZATION "Build visualization plugin" ON)
+
+add_subdirectory(core)
+add_subdirectory(qmidiplayer-desktop)
+add_subdirectory(sample-plugin)
+add_subdirectory(midifmt-plugin)
+add_subdirectory(simple-visualization)
+if(BUILD_VISUALIZATION)
+ add_subdirectory(visualization)
+endif()