blob: 620ef0c37afc66a1ebdb4fa341bf7d4742c46b4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
--- source/CMakeLists.txt.orig 2021-11-01 04:27:52 UTC
+++ source/CMakeLists.txt
@@ -105,21 +105,24 @@ else()
endif()
# System MIDI support
-if(WIN32)
- target_compile_definitions(zmusic-obj INTERFACE HAVE_SYSTEM_MIDI)
- target_link_libraries(zmusic-obj INTERFACE winmm)
- target_sources(zmusic-obj INTERFACE mididevices/music_win_mididevice.cpp)
-elseif(NOT APPLE)
- find_package(ALSA)
- if(ALSA_FOUND)
+option(SYSTEM_MIDI "Use system MIDI support" ON)
+if(SYSTEM_MIDI)
+ if(WIN32)
target_compile_definitions(zmusic-obj INTERFACE HAVE_SYSTEM_MIDI)
- target_sources(zmusic-obj
- INTERFACE
- mididevices/music_alsa_mididevice.cpp
- mididevices/music_alsa_state.cpp
- )
- target_link_libraries(zmusic-obj INTERFACE ALSA::ALSA)
- determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET ALSA::ALSA MODULE ALSA)
+ target_link_libraries(zmusic-obj INTERFACE winmm)
+ target_sources(zmusic-obj INTERFACE mididevices/music_win_mididevice.cpp)
+ elseif(NOT APPLE)
+ find_package(ALSA)
+ if(ALSA_FOUND)
+ target_compile_definitions(zmusic-obj INTERFACE HAVE_SYSTEM_MIDI)
+ target_sources(zmusic-obj
+ INTERFACE
+ mididevices/music_alsa_mididevice.cpp
+ mididevices/music_alsa_state.cpp
+ )
+ target_link_libraries(zmusic-obj INTERFACE ALSA::ALSA)
+ determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET ALSA::ALSA MODULE ALSA)
+ endif()
endif()
endif()
|