aboutsummaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-21 11:43:49 +0100
committerThomas White <taw@physics.org>2018-03-21 16:55:20 +0100
commit0b849787cd825f5d4e5b16f1e64552ecb10d0b76 (patch)
tree44d1f0e017710e913c6d695bcb6b68edb8ec9e8a /CMake
parent12e5aaa14841a7b6b8b80a1e32a2512354801f10 (diff)
Fix CBFlib detection
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindCBF.cmake13
1 files changed, 12 insertions, 1 deletions
diff --git a/CMake/FindCBF.cmake b/CMake/FindCBF.cmake
index d65b0ccf..e51fd01a 100644
--- a/CMake/FindCBF.cmake
+++ b/CMake/FindCBF.cmake
@@ -10,7 +10,18 @@ if (CBF_INCLUDES)
set (CBF_FIND_QUIETLY TRUE)
endif (CBF_INCLUDES)
-find_path (CBF_INCLUDES cbf.h PATH_SUFFIXES libcbf cbf)
+find_path (CBF_CBF_INCLUDES cbf/cbf.h)
+find_path (CBFLIB_CBF_INCLUDES cbflib/cbf.h)
+
+if (NOT CBF_CBF_INCLUDES MATCHES "NOTFOUND")
+ message(STATUS "Found cbf/cbf.h in ${CBF_CBF_INCLUDES}")
+ set(CBF_INCLUDES ${CBF_CBF_INCLUDES})
+ set(HAVE_CBF_CBF_H ON)
+elseif (NOT CBFLIB_CBF_INCLUDES MATCHES "NOTFOUND")
+ message(STATUS "Found cbflib/cbf.h in ${CBFLIB_CBF_INCLUDES}")
+ set(CBF_INCLUDES ${CBFLIB_CBF_INCLUDES})
+ set(HAVE_CBFLIB_CBF_H ON)
+endif (NOT CBF_CBF_INCLUDES MATCHES "NOTFOUND")
find_library (CBF_LIBRARIES NAMES cbf)