diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2025-05-16 08:12:15 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2025-05-16 08:54:15 +0200 |
commit | 5f0fef82211aa659a31a4b49308c5ad8779d2a2b (patch) | |
tree | 9bbd07f5760acca9537ba95d2c549a0c822ceede /compat | |
parent | 90db63a4bf87e906dde46c2cafca8c6252c390e1 (diff) |
cmake: move dependency check closer to actual use-site
Diffstat (limited to 'compat')
-rw-r--r-- | compat/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt index dc81436d..87b191cc 100644 --- a/compat/CMakeLists.txt +++ b/compat/CMakeLists.txt @@ -7,3 +7,18 @@ endif() if(WIN32) target_link_libraries(${self} strmiids) endif() + + +if(APPLE) + target_link_libraries(${self} proc) +elseif(LINUX) + otr_pkgconfig_(has-libproc2 ${self} libproc2) + if(has-libproc2) + target_compile_definitions(${self} PUBLIC -DOTR_HAS_LIBPROC2) + else() + otr_pkgconfig_(has-libprocps ${self} libprocps) + if(NOT has-libprocps) + message(FATAL_ERROR "install libproc2 or libprocps development files") + endif() + endif() +endif() |