mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
25467aa85a
commit
7596db28b5
2 changed files with 7 additions and 6 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue