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

@@ -16,6 +16,9 @@ endif()
if(NOT TARGET Python::Python)
message(SEND_ERROR "Python::Python not found")
endif()
if(NOT TARGET Python::Module)
message(SEND_ERROR "Python::Module not found")
endif()
Python_add_library (spam3 MODULE ../spam.c)
target_compile_definitions (spam3 PRIVATE PYTHON3)