diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-05-04 15:09:31 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-05-07 14:37:24 (GMT) |
commit | 30b873c05d6281b865ba08524bb1b90e0afd1ece (patch) | |
tree | 235ff9a85d3a4e83de7f2b7ad94037d1edcb07eb /Modules/FindPython2.cmake | |
parent | 37bf503db268c41d5a337265300357c76bda34ea (diff) | |
download | CMake-30b873c05d6281b865ba08524bb1b90e0afd1ece.zip CMake-30b873c05d6281b865ba08524bb1b90e0afd1ece.tar.gz CMake-30b873c05d6281b865ba08524bb1b90e0afd1ece.tar.bz2 |
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/FindPython2.cmake')
-rw-r--r-- | Modules/FindPython2.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake index a2be84f..67499d8 100644 --- a/Modules/FindPython2.cmake +++ b/Modules/FindPython2.cmake @@ -47,7 +47,11 @@ This module defines the following :ref:`Imported Targets <Imported Targets>` ``Python2::Compiler`` Python 2 compiler. Target defined if component ``Compiler`` is found. ``Python2::Python`` - Python 2 library. Target defined if component ``Development`` is found. + Python 2 library for Python embedding. Target defined if component + ``Development`` is found. +``Python2::Module`` + Python 2 library for Python module. Target defined if component + ``Development`` is found. ``Python2::NumPy`` NumPy library for Python 2. Target defined if component ``NumPy`` is found. @@ -174,11 +178,11 @@ Hints Commands ^^^^^^^^ -This module defines the command ``Python2_add_library`` (when +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 -``Python2::Python``:: +:command:`add_library` and adds a dependency to target ``Python2::Python`` or, +when library type is ``MODULE``, to target ``Python2::Module`` and takes care +of Python module naming rules:: Python2_add_library (my_module MODULE src1.cpp) |