summaryrefslogtreecommitdiff
path: root/Modules/FindPython.cmake
diff options
context:
space:
mode:
authorHiroshi Miura <miurahr@linux.com>2018-12-12 13:16:08 +0900
committerHiroshi Miura <miurahr@linux.com>2019-01-25 01:26:48 +0900
commit513e77550daaac083cb13b3df53be955a7d0b429 (patch)
tree1f385549e6d31ea80fcd15ccdbd5a567e86b9990 /Modules/FindPython.cmake
parent1d02491950b0aa05d2053e7fa32b39dca31e537b (diff)
downloadcmake-513e77550daaac083cb13b3df53be955a7d0b429.tar.gz
FindPython: Introduce NumPy component
Fixes: #18678 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Diffstat (limited to 'Modules/FindPython.cmake')
-rw-r--r--Modules/FindPython.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake
index f5fb0ab42f..f014916b29 100644
--- a/Modules/FindPython.cmake
+++ b/Modules/FindPython.cmake
@@ -14,11 +14,12 @@ Three components are supported:
* ``Compiler``: search for Python compiler. Only offered by IronPython.
* ``Development``: search for development artifacts (include directories and
libraries).
+* ``NumPy``: search for NumPy include directories.
If no ``COMPONENTS`` is specified, ``Interpreter`` is assumed.
-To ensure consistent versions between components ``Interpreter``, ``Compiler``
-and ``Development``, specify all components at the same time::
+To ensure consistent versions between components ``Interpreter``, ``Compiler``,
+``Development`` and ``NumPy``, specify all components at the same time::
find_package (Python COMPONENTS Interpreter Development)
@@ -39,6 +40,8 @@ This module defines the following :ref:`Imported Targets <Imported Targets>`
Python compiler. Target defined if component ``Compiler`` is found.
``Python::Python``
Python library. Target defined if component ``Development`` is found.
+``Python::NumPy``
+ NumPy Python library. Target defined if component ``NumPy`` is found.
Result Variables
^^^^^^^^^^^^^^^^
@@ -104,6 +107,12 @@ This module will set the following variables in your project
Python minor version.
``Python_VERSION_PATCH``
Python patch version.
+``Python_NumPy_FOUND``
+ System has the NumPy.
+``Python_NumPy_INCLUDE_DIRS``
+ The NumPy include directries.
+``Python_NumPy_VERSION``
+ The NumPy version.
Hints
^^^^^