FindPython: add sub-components to Development component

Fixes: #20425
This commit is contained in:
Marc Chevrier
2020-04-15 15:55:50 +02:00
parent bec1c211d9
commit c1b4044d3e
13 changed files with 452 additions and 113 deletions

View File

@@ -8,6 +8,12 @@ find_package(Python ${Python_REQUESTED_VERSION} REQUIRED COMPONENTS Interpreter
if (NOT Python_FOUND)
message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}")
endif()
if (NOT Python_Development.Module_FOUND)
message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}, COMPONENT 'Development.Module'")
endif()
if (NOT Python_Development.Embed_FOUND)
message (FATAL_ERROR "Fail to found Python ${Python_REQUESTED_VERSION}, COMPOENENT 'Development.Embed'")
endif()
if(NOT TARGET Python::Interpreter)
message(SEND_ERROR "Python::Interpreter not found")