30 Commits

Author SHA1 Message Date
Sam Edwards
3104bf3710 CMake: Fix issue with HAVE_X safety checks falsely failing 2020-01-08 20:13:34 -07:00
Sam Edwards
b00d7b23bc CMake: Use CMAKE_FIND_PACKAGE_PREFER_CONFIG to control find_package override 2019-12-31 06:48:06 -07:00
Sam Edwards
74e9c610d3 CMake: Don't assume <PackageName>_FOUND will always be caps
This is more consistent with the new find_package() behavior,
especially when CONFIG mode is involved.
2019-12-31 06:47:34 -07:00
Sam Edwards
bc152f665c CMake: Escape $<LINK_ONLY> in exported packages file 2019-12-05 10:34:47 -07:00
Sam Edwards
5fa4af9189 CMake: Rely on GNUInstallDirs to specify install paths
This makes multiarch OSes happy as they can dictate that
64-bit libraries go into 'lib64'
2019-08-31 00:48:42 -06:00
Donny Lawrence
10abe6e216 CMake: Remove usages of string(APPEND ...) 2019-06-27 17:38:18 -06:00
Sam Edwards
d3ef7bf12d CMake: Avoid using continue()
This is, sadly, not added until CMake 3.4.

This commit avoids continue() by restructuring the loops so
that the conditions previously being used for continue() are
no longer needed. The alternative would've been to encase the
loop bodies massive ifs, but I find that to be a poor choice
for readability.
2019-06-25 03:34:51 -06:00
Sam Edwards
6097d34ead CMake: Neatly format everything for readability and consistency 2019-04-14 22:37:18 -06:00
Sam Edwards
d961514892 CMake: Use string/list(APPEND foo ...) instead of set(foo ${foo} ...) 2019-01-19 17:01:36 -07:00
Sam Edwards
30dd14c991 CMake: Fix "whitelisted property" error from CMake <3.8 2019-01-03 11:40:57 -07:00
Sam Edwards
f01303a0b3 CMake: Fix exported packages on Windows 2019-01-03 06:01:57 -07:00
Sam Edwards
bddd7c1b4b CMake: Generate/install exported target sets 2018-12-27 17:39:22 -07:00
Sam Edwards
b20c6e801c CMake: Add an export_packages() function to export PKG::*
This is needed to support install(EXPORT)
2018-12-27 17:20:25 -07:00
Sam Edwards
2b1554a44c CMake: Rename "config_package" function to "package_status"
The latter name is more consistent with what it does:
indicates the status/purpose/options of the package to
the user.
2018-11-08 21:15:00 -07:00
Sam Edwards
dd5c411e88 CMake: When building metalib components, properly flag SYSTEM include dirs 2018-10-18 13:42:12 -06:00
Sam Edwards
bd187643f3 CMake: Look for packages by CONFIG first
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.
2018-09-21 19:22:59 -06:00
Sam Edwards
968ca123d4 CMake: Use packages by imported target where available
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.
2018-09-21 16:24:48 -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
0c889db928 CMake: Don't conflict with find_package internal variables 2018-09-05 19:19:36 -06:00
Sam Edwards
540c4fc2cd CMake: Delete excess spaces 2018-02-21 02:54:09 -07:00
Sam Edwards
2399655920 CMake: Make sure Interrogate doesn't see package include directories 2018-02-17 16:56:35 -07:00
Sam Edwards
f75e245b1f CMake: Enhance PackageConfig's include directory processing and name separation 2018-02-16 17:38:51 -07:00
Sam Edwards
021728f4b3 CMake: Start the process of organizing packages into Package.cmake 2018-02-14 16:46:20 -07:00
Sam Edwards
1fa1eb63cb CMake: Don't use target_include_directories, it's not supported on CMake 2.8.4. 2014-08-02 20:26:15 -07:00
Sam Edwards
c53a656b4b cmake: Fix typo in PackageConfig. 2014-04-11 03:37:46 -06:00
kestred
f8b901f60a Fix incorrect licensing and add missing parens after else. 2014-01-30 09:39:29 -07:00
kestred
bb19d8cb23 Enable package filtering by license in Distribution builds, and disable most packages by default in MinSizeRel builds. 2014-01-30 09:33:20 -07:00
kestred
b04ebdda98 Have package_option automatically generate option library targets instead of checking in every instance they're used. 2014-01-30 06:47:09 -07:00
kestred
995688760b In panda config, unset libraries we're not using so that they're not used as link targets. 2014-01-30 06:21:50 -07:00
kestred
8cdc819344 cmake: config: Move new package macros to cmake/macros, use new package macros in Package.cmake, begin removing redundant package/config options from Package.cmake (theses are being moved to Config.cmake). 2013-12-21 19:30:53 -07:00