summaryrefslogtreecommitdiffstats
path: root/Modules/FindPython2.cmake
diff options
context:
space:
mode:
authorHiroshi Miura <miurahr@linux.com>2018-12-12 04:16:08 (GMT)
committerHiroshi Miura <miurahr@linux.com>2019-01-24 16:26:48 (GMT)
commit513e77550daaac083cb13b3df53be955a7d0b429 (patch)
tree1f385549e6d31ea80fcd15ccdbd5a567e86b9990 /Modules/FindPython2.cmake
parent1d02491950b0aa05d2053e7fa32b39dca31e537b (diff)
downloadCMake-513e77550daaac083cb13b3df53be955a7d0b429.zip
CMake-513e77550daaac083cb13b3df53be955a7d0b429.tar.gz
CMake-513e77550daaac083cb13b3df53be955a7d0b429.tar.bz2
FindPython: Introduce NumPy component
Fixes: #18678 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Diffstat (limited to 'Modules/FindPython2.cmake')
-rw-r--r--Modules/FindPython2.cmake13
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index b770708..0bb7b28 100644
--- a/Modules/FindPython2.cmake
+++ b/Modules/FindPython2.cmake
@@ -14,11 +14,12 @@ Three components are supported:
* ``Compiler``: search for Python 2 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 (Python2 COMPONENTS Interpreter Development)
@@ -40,6 +41,8 @@ This module defines the following :ref:`Imported Targets <Imported Targets>`
Python 2 compiler. Target defined if component ``Compiler`` is found.
``Python2::Python``
Python 2 library. Target defined if component ``Development`` is found.
+``Python2::NumPy``
+ NumPy library for Python 2. Target defined if component ``NumPy`` is found.
Result Variables
^^^^^^^^^^^^^^^^
@@ -105,6 +108,12 @@ This module will set the following variables in your project
Python 2 minor version.
``Python2_VERSION_PATCH``
Python 2 patch version.
+``Python2_NumPy_FOUND``
+ System has the NumPy.
+``Python2_NumPy_INCLUDE_DIRS``
+ The NumPy include directries.
+``Python2_NumPy_VERSION``
+ The NumPy version.
Hints
^^^^^