summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorManuel Bentele2020-11-23 07:52:28 +0100
committerManuel Bentele2020-11-23 07:52:28 +0100
commit1baa63afc6f321e27fbeab81e31965432fb5bc2d (patch)
tree1267a9adcef02e69d452ff1f3c5df61131dd6bc3 /cmake
parent[BUILD] add CMake find package search to find 'libatomic' automatically (diff)
downloaddnbd3-1baa63afc6f321e27fbeab81e31965432fb5bc2d.tar.gz
dnbd3-1baa63afc6f321e27fbeab81e31965432fb5bc2d.tar.xz
dnbd3-1baa63afc6f321e27fbeab81e31965432fb5bc2d.zip
[BUILD] update search paths for 'libatomic' to support build on FreeBSD
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindLibatomic.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/FindLibatomic.cmake b/cmake/FindLibatomic.cmake
index f827eae..4f7dea2 100644
--- a/cmake/FindLibatomic.cmake
+++ b/cmake/FindLibatomic.cmake
@@ -13,15 +13,18 @@ set(Libatomic_VERSION ${PKG_Libatomic_VERSION})
find_path(Libatomic_INCLUDE_DIR
NAMES stdatomic.h
- HINTS ${PKG_Libatomic_INCLUDE_DIRS})
+ HINTS ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}
+ ${PKG_Libatomic_INCLUDE_DIRS})
find_library(Libatomic_LIBRARY
NAMES atomic
- HINTS ${PKG_Libatomic_LIBRARY_DIRS})
+ HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
+ ${PKG_Libatomic_LIBRARY_DIRS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libatomic
FOUND_VAR Libatomic_FOUND
REQUIRED_VARS Libatomic_LIBRARY
+ Libatomic_INCLUDE_DIR
VERSION_VAR Libatomic_VERSION
FAIL_MESSAGE "Library 'atomic' is not available! Please install this required library!")