diff options
Diffstat (limited to 'compat/CMakeLists.txt')
-rw-r--r-- | compat/CMakeLists.txt | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt index fb498fb6..87b191cc 100644 --- a/compat/CMakeLists.txt +++ b/compat/CMakeLists.txt @@ -1,7 +1,3 @@ -if(CMAKE_COMPILER_IS_GNUCXX) - add_compile_options(-fno-lto -fno-fast-math -fno-finite-math-only -O0) -endif() - otr_module(compat NO-COMPAT BIN) if(NOT WIN32 AND NOT APPLE) @@ -11,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() |