FindPython*: Manage weak link for Python modules

Add new target Python::Module which take care of platform requirements
for Python module development.

Fixes: #18100
This commit is contained in:
Marc Chevrier
2019-05-04 17:09:31 +02:00
parent 37bf503db2
commit 30b873c05d
21 changed files with 277 additions and 90 deletions

View File

@@ -21,6 +21,9 @@ endif()
if(NOT TARGET Python2::Python)
message(SEND_ERROR "Python2::Python not found")
endif()
if(NOT TARGET Python2::Module)
message(SEND_ERROR "Python2::Module not found")
endif()
Python2_add_library (spam2 MODULE ../spam.c)
target_compile_definitions (spam2 PRIVATE PYTHON2)