10 Commits

Author SHA1 Message Date
Sam Edwards
e89621b88d CMake: "Flatten" metalibs more
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.
2018-10-10 20:16:32 -06:00
Sam Edwards
b8fa692e2f CMake: Fix BuildMetalib on CMake 3.0.2
CMake now tests out correctly on 3.0.2 again.
2018-10-09 02:01:35 -06:00
Sam Edwards
9b4b83c0e1 CMake: Properly propagate INTERFACE_COMPILE_DEFINITIONS to component libs 2018-10-07 00:51:26 -06:00
Sam Edwards
1520d712d4 CMake: Remove target_use_packages
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.
2018-09-21 10:17:05 -06:00
Sam Edwards
2e98b68e3b CMake: Make directbase/pandabase INTERFACE libraries
They export no code, and are really only used to contain several
preprocessor macros relevant to their respective packages. On
Windows, they're a problem: MSVC doesn't generate a .lib when
compiling a .dll that exports nothing.
2018-06-10 02:29:49 -06:00
Sam Edwards
a088e6aba5 CMake: Autogenerate metalib init files 2018-06-10 02:29:35 -06:00
Sam Edwards
5b3ca1bb05 CMake: Fix up the "transitive library" metalib logic
This fixes some cases where transitive libraries, as nominated
by a component library, were not being absorbed into a metalib,
due to the library actually not being defined yet. This makes the
logic a little more robust, first by explicitly requiring a metalib
definition to come after all component library definitions, and second
to assume a library "linked" to a component library is a non-component
if it isn't defined (yet).
2018-04-20 00:20:14 -06:00
Sam Edwards
218d0e8ade CMake: Build dtool metalibs as metalibs 2018-04-19 00:07:08 -06:00
Sam Edwards
5a31844e11 CMake: Slightly tweak component-library -D inheritance rules
This only inherits -D flags from another component library. The private
-D flags should not be inherited from regular libraries.
2018-04-19 00:07:08 -06:00
Sam Edwards
4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -06:00