From f241c4546b19b2e0bd85429831e0b9b7340c0718 Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Fri, 7 Aug 2015 20:59:06 +0200 Subject: [PATCH] Avoid linking against disabled features If rsvg or startup-notification features are disabled, the binary should not be linked against the associated libraries. --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2d1574..2133a39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,9 +148,13 @@ target_link_libraries( tint2 ${X11_LIBRARIES} ${CAIRO_LIBRARIES} ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARIES} - ${IMLIB2_LIBRARIES} - ${RSVG_LIBRARIES} - ${SN_LIBRARIES} ) + ${IMLIB2_LIBRARIES} ) +if( ENABLE_RSVG ) + target_link_libraries( tint2 ${RSVG_LIBRARIES} ) +endif( ENABLE_RSVG ) +if( ENABLE_SN ) + target_link_libraries( tint2 ${SN_LIBRARIES} ) +endif( ENABLE_SN ) if( RT_LIBRARY ) target_link_libraries( tint2 ${RT_LIBRARY} ) endif( RT_LIBRARY )