summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindGCRYPT.cmake5
-rw-r--r--cmake/Modules/FindSPHINX.cmake12
2 files changed, 16 insertions, 1 deletions
diff --git a/cmake/Modules/FindGCRYPT.cmake b/cmake/Modules/FindGCRYPT.cmake
index b73bfd0..cd51c1f 100644
--- a/cmake/Modules/FindGCRYPT.cmake
+++ b/cmake/Modules/FindGCRYPT.cmake
@@ -16,7 +16,10 @@
# This file is in the public domain
include(FindPkgConfig)
-pkg_check_modules(GCRYPT gcrypt)
+
+if(NOT GCRYPT_FOUND)
+ pkg_check_modules(GCRYPT gcrypt)
+endif()
if(NOT GCRYPT_FOUND)
find_path(GCRYPT_INCLUDE_DIRS NAMES gcrypt.h
diff --git a/cmake/Modules/FindSPHINX.cmake b/cmake/Modules/FindSPHINX.cmake
new file mode 100644
index 0000000..c39b827
--- /dev/null
+++ b/cmake/Modules/FindSPHINX.cmake
@@ -0,0 +1,12 @@
+find_program(SPHINX_BIN
+ NAMES sphinx-build
+ HINTS $ENV{SPHINX_DIR}
+ PATH_SUFFIXES bin
+ DOC "Sphinx executable to build the documentation"
+)
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(SPHINX REQUIRED_VARS SPHINX_BIN)
+
+mark_as_advanced(SPHINX_EXECUTABLE)