I’ve tried the following with cmake 3.28 (ubuntu 24.04) and 4.04 (mac arm).
I had expected to find libraries and include directories.
Could someone please explain why Python3_Development.SABIModule_FOUND is TRUE, but the associated variables are empty? There is probably a good reason for this, but the documentation is not clear about the behavior.
The real artifacts defined by a component depends on the platform.
If you are on Linux or macOS, the libraries are not required for the development using the Python Stable ABI. This explains why the Python3_SABI_LIBRARIES variable is empty, as well as the LOCATIONtarget property. Only the include directories are defined by the variable Python3_INCLUDE_DIRS and the INTERFACE_INCLUDE_DIRECTORIEStarget property.
By the way, the variable Python3_SABI_INCLUDE_DIRS is never defined by the Python3 module.
In practice, if you are relying on the targets defined by the Python3 module as well as the python3_add_library() command, you don’t have to worry about the variables…
And to finish, it is assumed that the developers using this module are a minimum aware of what are the constraints and usages regarding python developments. This is not the role of the documentation of the Python3module to provide such development details.
I was aware that the Python3_SABI_LIBRARIES are not needed on Linux and macOS. I had expected them to be the same as Python3_LIBRARIES. The most confusing part was that