From 9d9ecd701d72d313bb1ffe48ae2a5178c127ce2a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 2 Aug 2020 02:24:21 +0300 Subject: [PATCH] crude build fix for FreeBSD Signed-off-by: Ivailo Monev --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a508a1da7..76faab31f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,12 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.3.0") cmake_policy(SET CMP0063 NEW) endif() +# LLVM linker does not have a default library search path and only library names are received +# from pkg-config queries, add some directories known to contain system wide libraries +if(CMAKE_SYSTEM_NAME MATCHES "BSD") + link_directories(/usr/local/lib /usr/lib /lib) +endif() + include(CheckIncludeFile) include(CheckIncludeFileCXX) include(CheckTypeSize)