diff options
Diffstat (limited to 'Modules/FindPython3.cmake')
-rw-r--r-- | Modules/FindPython3.cmake | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/Modules/FindPython3.cmake b/Modules/FindPython3.cmake index 122316b..1373407 100644 --- a/Modules/FindPython3.cmake +++ b/Modules/FindPython3.cmake @@ -13,13 +13,24 @@ The following components are supported: * ``Interpreter``: search for Python 3 interpreter * ``Compiler``: search for Python 3 compiler. Only offered by IronPython. * ``Development``: search for development artifacts (include directories and - libraries) + libraries). This component includes two sub-components which can be specified + independently: + + * ``Development.Module``: search for artifacts for Python 3 module + developments. + * ``Development.Embed``: search for artifacts for Python 3 embedding + developments. + * ``NumPy``: search for NumPy include directories. If no ``COMPONENTS`` are specified, ``Interpreter`` is assumed. +If component ``Development`` is specified, it implies sub-components +``Development.Module`` and ``Development.Embed``. + To ensure consistent versions between components ``Interpreter``, ``Compiler``, -``Development`` and ``NumPy``, specify all components at the same time:: +``Development`` (or one of its sub-components) and ``NumPy``, specify all +components at the same time:: find_package (Python3 COMPONENTS Interpreter Development) @@ -31,10 +42,11 @@ for you. .. note:: - If components ``Interpreter`` and ``Development`` are both specified, this - module search only for interpreter with same platform architecture as the one - defined by ``CMake`` configuration. This contraint does not apply if only - ``Interpreter`` component is specified. + If components ``Interpreter`` and ``Development`` (or one of its + sub-components) are both specified, this module search only for interpreter + with same platform architecture as the one defined by ``CMake`` + configuration. This contraint does not apply if only ``Interpreter`` + component is specified. Imported Targets ^^^^^^^^^^^^^^^^ @@ -46,12 +58,12 @@ This module defines the following :ref:`Imported Targets <Imported Targets>` Python 3 interpreter. Target defined if component ``Interpreter`` is found. ``Python3::Compiler`` Python 3 compiler. Target defined if component ``Compiler`` is found. -``Python3::Python`` - Python 3 library for Python embedding. Target defined if component - ``Development`` is found. ``Python3::Module`` Python 3 library for Python module. Target defined if component - ``Development`` is found. + ``Development.Module`` is found. +``Python3::Python`` + Python 3 library for Python embedding. Target defined if component + ``Development.Embed`` is found. ``Python3::NumPy`` NumPy library for Python 3. Target defined if component ``NumPy`` is found. @@ -116,6 +128,10 @@ This module will set the following variables in your project * IronPython ``Python3_Development_FOUND`` System has the Python 3 development artifacts. +``Python3_Development.Module_FOUND`` + System has the Python 3 development artifacts for Python module. +``Python3_Development.Embed_FOUND`` + System has the Python 3 development artifacts for Python embedding. ``Python3_INCLUDE_DIRS`` The Python 3 include directories. ``Python3_LIBRARIES`` |