diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-04-10 12:08:26 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-10 12:08:26 -0700 |
commit | 7596db28b5ad55f8ff7cfd7c04eda8febe9ba012 (patch) | |
tree | 593f31b8e52846cd680dc0dba40fed2f4d58ffa5 /CMakeLists.txt | |
parent | 25467aa85a533638ad9c727539ebc093bba4c489 (diff) | |
download | subsurface-7596db28b5ad55f8ff7cfd7c04eda8febe9ba012.tar.gz |
cmake: allow looking for optional libraries
And use this to look for libusb.
If it's there then libdivecomputer likely was linked against it. If it isn't
then we don't need it, either.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index acb078785..acd9577dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,11 @@ endif() FIND_PACKAGE(PkgConfig) INCLUDE(cmake/Modules/pkgconfig_helper.cmake) -pkg_config_library(LIBXML libxml-2.0) -pkg_config_library(LIBSQLITE3 sqlite3) -pkg_config_library(LIBXSLT libxslt) -pkg_config_library(LIBZIP libzip) +pkg_config_library(LIBXML libxml-2.0 REQUIRED) +pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED) +pkg_config_library(LIBXSLT libxslt REQUIRED) +pkg_config_library(LIBZIP libzip REQUIRED) +pkg_config_library(LIBUSB libusb-1.0 QUIET) # more libraries with special handling in case we build them ourselves |