diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2014-08-21 20:30:54 +0100 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2014-09-22 01:06:45 -0700 |
commit | 62f882c3922af45019bc6ba2a1b4a775bf76ef97 (patch) | |
tree | 82d1baafcb68069d0c7199bcf06d9f3d83e34954 | |
parent | e0a1970468d60e0fb50b87aa1bd460ccba433b6f (diff) | |
download | waffle-62f882c3922af45019bc6ba2a1b4a775bf76ef97.tar.gz |
cmake: do not over-link
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.velikov@gmail.com>
-rw-r--r-- | src/waffle/CMakeLists.txt | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt index 910e234..0e42192 100644 --- a/src/waffle/CMakeLists.txt +++ b/src/waffle/CMakeLists.txt @@ -32,15 +32,35 @@ include_directories( # Target: waffle (shared library) # ---------------------------------------------------------------------------- -set(waffle_libdeps - ${egl_LDFLAGS} - ${gbm_LDFLAGS} - ${gl_LDFLAGS} - ${libudev_LDFLAGS} - ${wayland-client_LDFLAGS} - ${wayland-egl_LDFLAGS} - ${x11-xcb_LDFLAGS} - ) +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 |