In the cases where we have the dependencies/libs of a waffle back-end, and wish you opt-out of it we currently link against the library. Avoid that an honour the user selection.
Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com> --- src/waffle/CMakeLists.txt | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt index f126fac..39ead01 100644 --- a/src/waffle/CMakeLists.txt +++ b/src/waffle/CMakeLists.txt @@ -34,15 +34,37 @@ include_directories( # ---------------------------------------------------------------------------- set(waffle_libdeps - ${egl_LDFLAGS} - ${gbm_LDFLAGS} - ${gl_LDFLAGS} - ${libudev_LDFLAGS} - ${wayland-client_LDFLAGS} - ${wayland-egl_LDFLAGS} - ${x11-xcb_LDFLAGS} ${THREADS_LIBRARIES} ) +if(waffle_on_linux) + if(waffle_has_egl) + list(APPEND waffle_libdeps + ${egl_LDFLAGS} + ) + endif() + if(waffle_has_glx) + list(APPEND waffle_libdeps + ${gl_LDFLAGS} + ) + endif() + if(waffle_has_wayland) + list(APPEND waffle_libdeps + ${wayland-client_LDFLAGS} + ${wayland-egl_LDFLAGS} + ) + endif() + if(waffle_has_x11) + list(APPEND waffle_libdeps + ${x11-xcb_LDFLAGS} + ) + endif() + if(waffle_has_gbm) + list(APPEND waffle_libdeps + ${gbm_LDFLAGS} + ${libudev_LDFLAGS} + ) + endif() +endif() set(waffle_sources api/api_priv.c -- 2.0.2 _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle