summaryrefslogtreecommitdiffstats
path: root/Modules/FindPython2.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-01-23 15:08:27 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-01-23 18:51:09 (GMT)
commite4541b0e3dde49183742eda8100f608d03d0d027 (patch)
tree0648ada92e0528999a0259681c560bf7567937e3 /Modules/FindPython2.cmake
parent8ef1916c8226ebf781c4ad0de158d15754d411f5 (diff)
downloadCMake-e4541b0e3dde49183742eda8100f608d03d0d027.zip
CMake-e4541b0e3dde49183742eda8100f608d03d0d027.tar.gz
CMake-e4541b0e3dde49183742eda8100f608d03d0d027.tar.bz2
FindPython: Support script mode
Fixes: #18827
Diffstat (limited to 'Modules/FindPython2.cmake')
-rw-r--r--Modules/FindPython2.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake
index 998e992..b770708 100644
--- a/Modules/FindPython2.cmake
+++ b/Modules/FindPython2.cmake
@@ -31,7 +31,8 @@ for you.
Imported Targets
^^^^^^^^^^^^^^^^
-This module defines the following :ref:`Imported Targets <Imported Targets>`:
+This module defines the following :ref:`Imported Targets <Imported Targets>`
+(when :prop_gbl:`CMAKE_ROLE` is ``PROJECT``):
``Python2::Interpreter``
Python 2 interpreter. Target defined if component ``Interpreter`` is found.
@@ -145,9 +146,10 @@ Hints
Commands
^^^^^^^^
-This module defines the command ``Python2_add_library`` which have the same
-semantic as :command:`add_library` but take care of Python module naming rules
-(only applied if library is of type ``MODULE``) and add dependency to target
+This module defines the command ``Python2_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``::
Python2_add_library (my_module MODULE src1.cpp)