diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | cmake/Modules/pkgconfig_helper.cmake | 4 |
2 files changed, 7 insertions, 6 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 diff --git a/cmake/Modules/pkgconfig_helper.cmake b/cmake/Modules/pkgconfig_helper.cmake index afb523855..f53a1064d 100644 --- a/cmake/Modules/pkgconfig_helper.cmake +++ b/cmake/Modules/pkgconfig_helper.cmake @@ -1,5 +1,5 @@ -MACRO(pkg_config_library LIBNAME pcfile) - pkg_check_modules(${LIBNAME} REQUIRED ${pcfile}) +MACRO(pkg_config_library LIBNAME pcfile option) + pkg_check_modules(${LIBNAME} ${option} ${pcfile}) include_directories(${${LIBNAME}_INCLUDE_DIRS}) link_directories(${${LIBNAME}_LIBRARY_DIRS}) add_definitions(${${LIBNAME}_CFLAGS_OTHER}) |