File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,15 @@ endif()
3232if (LIBREMIDI_HAS_JACK)
3333 target_compile_definitions (libremidi ${_public} LIBREMIDI_JACK )
3434 if (LIBREMIDI_HAS_WEAKJACK)
35- target_compile_definitions (libremidi ${_public} LIBREMIDI_WEAKJACK )
35+ target_compile_definitions (libremidi ${_public} LIBREMIDI_WEAKJACK LIBREMIDI_HAS_JACK_GET_VERSION )
36+ else ()
37+ # JACK1 did not have LIBREMIDI_HAS_JACK_GET_VERSION. Just skip building the UMP binding in that case...
38+ block ()
39+ set (CMAKE_REQUIRED_INCLUDES $<BUILD_INTERFACE :${JACK_PATH} >)
40+ check_cxx_source_compiles ("#include <jack/jack.h>\n int main() { return sizeof(jack_get_version); }" LIBREMIDI_HAS_JACK_GET_VERSION )
41+ if (LIBREMIDI_HAS_JACK_GET_VERSION)
42+ target_compile_definitions (libremidi ${_public} LIBREMIDI_HAS_JACK_GET_VERSION )
43+ endif ()
44+ endblock ()
3645 endif ()
3746endif ()
Original file line number Diff line number Diff line change 2929
3030#if defined(LIBREMIDI_JACK)
3131 #include < libremidi/backends/jack.hpp>
32- #include < libremidi/backends/jack_ump.hpp>
32+ #if defined(LIBREMIDI_HAS_JACK_GET_VERSION)
33+ #include < libremidi/backends/jack_ump.hpp>
34+ #endif
3335#endif
3436
3537#if defined(LIBREMIDI_PIPEWIRE)
@@ -175,7 +177,7 @@ static constexpr auto available_backends = make_tl(
175177 ,
176178 net_ump::backend{}
177179#endif
178- #if defined(LIBREMIDI_JACK)
180+ #if defined(LIBREMIDI_JACK) && defined(LIBREMIDI_HAS_JACK_GET_VERSION)
179181 ,
180182 jack_ump::backend{}
181183#endif
You can’t perform that action at this time.
0 commit comments