summaryrefslogtreecommitdiff
path: root/Modules/FindPython.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-05-04 17:09:31 +0200
committerMarc Chevrier <marc.chevrier@gmail.com>2019-05-07 16:37:24 +0200
commit30b873c05d6281b865ba08524bb1b90e0afd1ece (patch)
tree235ff9a85d3a4e83de7f2b7ad94037d1edcb07eb /Modules/FindPython.cmake
parent37bf503db268c41d5a337265300357c76bda34ea (diff)
downloadcmake-30b873c05d6281b865ba08524bb1b90e0afd1ece.tar.gz
FindPython*: Manage weak link for Python modules
Add new target Python::Module which take care of platform requirements for Python module development. Fixes: #18100
Diffstat (limited to 'Modules/FindPython.cmake')
-rw-r--r--Modules/FindPython.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake
index c5074e8b3d..36c0611218 100644
--- a/Modules/FindPython.cmake
+++ b/Modules/FindPython.cmake
@@ -46,7 +46,11 @@ This module defines the following :ref:`Imported Targets <Imported Targets>`
``Python::Compiler``
Python compiler. Target defined if component ``Compiler`` is found.
``Python::Python``
- Python library. Target defined if component ``Development`` is found.
+ Python library for Python embedding. Target defined if component
+ ``Development`` is found.
+``Python::Module``
+ Python library for Python module. Target defined if component ``Development``
+ is found.
``Python::NumPy``
NumPy Python library. Target defined if component ``NumPy`` is found.
@@ -175,9 +179,9 @@ Commands
This module defines the command ``Python_add_library`` (when
:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as
-:command:`add_library`, but takes care of Python module naming rules
-(only applied if library is of type ``MODULE``), and adds a dependency to target
-``Python::Python``::
+:command:`add_library` and adds a dependency to target ``Python::Python`` or,
+when library type is ``MODULE``, to target ``Python::Module`` and takes care of
+Python module naming rules::
Python_add_library (my_module MODULE src1.cpp)