This uses generator expressions to make sure the definitions are
discovered transitively. The output _igate.cxx file also has its
definitions applied to it via a source file property rather than
via add_definitions(), which prevents them from leaking to other
targets.
Previously, we would override target_link_libraries() to support
object "linking" since this wasn't supported in versions of CMake
before 3.12. Now that 3.12 is released, we only do it for versions
of CMake before that release.
By "flatten" I mean that component libraries aren't referenced by
genex anymore; instead, their include directories and libraries
are copied out of their interfaces and into the interface of
the metalib.
This prepares for exporting our targets, by making sure that the
component libraries don't have to be installed for CMake to be
able to export metalibs.
This allows building against the Python libraries even when the
Python interpreter/executable is missing. The correct extensions
for the binary modules will be guessed, the tests will fail,
and the bytecode for any pure-Python modules will not be
precompiled.
This also allows us to generate a suitable __init__.py for fixing
up PATH and/or __path__ on platforms that need it to properly
import Python extension modules.
This also involves the creation a new include: Python.cmake
This file will contain utility functions for building Python
modules and installing Python packages.
This is not perfect, and we need to more thoroughly address thread safety in the PRC system, but it will nonetheless address a lot of the race condition issues when querying these variables from two threads at the same time.
This requires a macro to override find_package,
as the default behavior in CMake is to fall back
from MODULE onto CONFIG.
Note that Bullet is given a specific override
not to look for a CONFIG, since Bullet tends to
use weird paths in its CONFIG script.
This is preferable because imported targets generally include
all of the relevant information specific to the particular
installation of each package, and without needing to hunt down
a bunch of variables to do it.
To do this, package_option() (which is starting to grow in scope
a little beyond just providing the package option, come to think
of it) is given a new IMPORTED_AS option, which tells the package
configuration system to look for one or more imported targets and
link against them instead.
Instead, let's use a PKG::PKGNAME interface library, which simplifies
the linking and also allows us to use imported libraries from
find_package in the future.
This enables the "setters" to behave in a way that people expect setters to behave. Since `setText(None)` now does not behave expectedly, a `clearText()` has also been added to remove the text.
Closes#385