aboutsummaryrefslogtreecommitdiff
path: root/CMake/FindXGANDALF.cmake
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-05-17 15:31:45 +0200
committerThomas White <taw@physics.org>2018-05-17 15:39:22 +0200
commita9f48b6507b0326a34b84d7600f5eb791993eeb1 (patch)
treeb89b6e73477125336c35c6d7d9996bd8ebae7fd7 /CMake/FindXGANDALF.cmake
parent87fd650abf11da75e7abd2ff90821cf7cb041b91 (diff)
parenta9f4c0ff4376267d90d6e8f9a0b6c012ec0588a4 (diff)
Merge branch 'tom/cmake'
Diffstat (limited to 'CMake/FindXGANDALF.cmake')
-rw-r--r--CMake/FindXGANDALF.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/CMake/FindXGANDALF.cmake b/CMake/FindXGANDALF.cmake
new file mode 100644
index 00000000..8138da77
--- /dev/null
+++ b/CMake/FindXGANDALF.cmake
@@ -0,0 +1,24 @@
+# - Find XGANDALF
+# Find the native XGANDALF includes and library
+#
+# XGANDALF_INCLUDES - where to find IndexerBase.h
+# XGANDALF_LIBRARIES - List of libraries when using XGANDALF.
+# XGANDALF_FOUND - True if XGANDALF found.
+
+if (XGANDALF_INCLUDES)
+ # Already in cache, be silent
+ set (XGANDALF_FIND_QUIETLY TRUE)
+endif (XGANDALF_INCLUDES)
+
+find_path (XGANDALF_INCLUDES xgandalf/IndexerBase.h
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include)
+
+find_library (XGANDALF_LIBRARIES xgandalf
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/lib)
+
+# handle the QUIETLY and REQUIRED arguments and set XGANDALF_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (XGANDALF DEFAULT_MSG XGANDALF_LIBRARIES XGANDALF_INCLUDES)