ports/audio/zmusic/files/patch-source_CMakeLists.txt
Kyle Evans 85ee66732b devel/zmusic: fix category to audio
devel is accurate, but audio is much more precise.

Reported by:	danfe
2021-11-10 10:03:52 -06:00

41 lines
1.4 KiB
Text

--- 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()