summaryrefslogtreecommitdiff
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2011-05-26 14:53:12 +0200
committerMichael Schroeder <mls@suse.de>2011-05-26 14:53:12 +0200
commit1129ccb9a62c8d1474472495dda4356946a21e5c (patch)
treea7aa6ff65ae4bc4210ff6b86690599320f5067cb /examples/CMakeLists.txt
parent66e7a252604ae81a027a2c7b8c437b7228eddcc4 (diff)
downloadlibsolv-1129ccb9a62c8d1474472495dda4356946a21e5c.tar.gz
libsolv-1129ccb9a62c8d1474472495dda4356946a21e5c.tar.bz2
libsolv-1129ccb9a62c8d1474472495dda4356946a21e5c.zip
- allow to build a shared and a static version of the libraries
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c3264a9..1d69d21 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,9 +1,11 @@
+# as we link with --as-needed we do not get bogus dependencies
+SET (SYSTEM_LIBRARIES ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
+IF (NOT DEBIAN)
+SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES})
+ENDIF (NOT DEBIAN)
+
ADD_EXECUTABLE (solv solv.c)
-IF (DEBIAN)
-TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
-ELSE (DEBIAN)
-TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${RPMDB_LIBRARY} ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
-ENDIF (DEBIAN)
+TARGET_LINK_LIBRARIES (solv libsolvext libsolv ${SYSTEM_LIBRARIES})
INSTALL(TARGETS
solv