summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-09-22 16:59:13 +0200
committerlouiz’ <louiz@louiz.org>2018-09-22 16:59:13 +0200
commit1a194a292e12c1f752afabe5a0bdc3b76706ee06 (patch)
tree6ac6ac68c285cc966350a85917143842ec4bb335 /cmake/Modules
parentbf97478b89b24bbf3a6a92c9137041cf2e987f02 (diff)
downloadbiboumi-sphinx-manpage.tar.gz
biboumi-sphinx-manpage.tar.bz2
biboumi-sphinx-manpage.tar.xz
biboumi-sphinx-manpage.zip
Diffstat (limited to 'cmake/Modules')
-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)