Commit Graph

178 Commits

Author SHA1 Message Date
Sam Edwards 2298aba578 CMake: Correct order for {opus,vorbis}file libs 2019-01-13 14:24:35 -07:00
Sam Edwards 052004d06b CMake: Detect Opus 2019-01-13 12:04:48 -07:00
Sam Edwards 8a2375a5f1 CMake: Detect Ogg+Vorbis 2019-01-13 11:58:09 -07:00
Sam Edwards 615a1d205d CMake: Modify Find*.cmake to trust find_*()'s caching 2019-01-13 10:45:03 -07:00
Sam Edwards 986377b131 CMake: Make CompositeSources skip sources with SKIP_COMPOSITING property 2019-01-12 15:00:03 -07:00
Sam Edwards 8d94790d3a CMake: Exclude .c files from compositing 2019-01-12 15:00:03 -07:00
Sam Edwards edb9cb31a5 CMake: Exclude .c files from Interrogate 2019-01-12 15:00:01 -07:00
Sam Edwards 654abdc5eb CMake: Detect when to set OPENCV_VER_23/OPENCV_VER_3 2019-01-06 15:37:14 -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 18d5c983de CMake: Make Python static library names use '.'
This is to be consistent with makepanda as of cedd4172c4.
2019-01-02 06:08:15 -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 8b6a2cfd09 CMake: Update add_python_module to support COMPONENT 2018-12-06 17:48:03 -07:00
Sam Edwards 9fffb5605a CMake: Update Python install macros to accept COMPONENT and EXPORT 2018-12-06 17:47:19 -07:00
Sam Edwards b3e257746e CMake: Oops, fix where `panda3d` Python package goes 2018-12-05 19:51:04 -07:00
Sam Edwards 58dd889165 CMake: Simplify Interrogate.cmake's add_python_module() keyword handling 2018-12-05 18:56:29 -07:00
Sam Edwards e49306fec9 CMake: Wrap target names in $<TARGET_NAME:...>
This helps CMake's export generator understand the expression.
2018-11-28 16:13:05 -07:00
Sam Edwards 9be6b6b314 CMake: Work around bug in CMake 3.0.2
CMake versions that old insist that source files
in the binary directory be specified absolutely
or do not contain `..`, so we do the former.
2018-11-28 14:05:32 -07:00
Sam Edwards f59c6bb2bf CMake: Make FindODE link against libccd when present
This fixes building against the macOS/Homebrew version of ODE.
2018-11-15 02:24:28 -07:00
Sam Edwards 7f8d7366dc CMake: Update for upstream Interrogate changes
- "igateruntime" is no longer a thing
- interrogate_module embeds a preamble; we have to provide it
- WindowProperties now has an extension
2018-11-12 19:16:28 -07:00
Sam Edwards 1ae736f881 CMake: Detect and build support for Assimp 2018-11-12 15:49:08 -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 3050203e24 CMake: Update add_metalib() to support exports
This allows exporting (a stub function that forwards to) a
function that returns a value - it's particularly useful in
the graphics plugins for the "get_pipe_type_foo()" functions.

This also frees up CMake from needing to use any of the source
files in the metalibs/*/ directories.
2018-11-08 20:15:08 -07:00
Sam Edwards d43767c617 CMake: Find OpenEXR, support it in pnmimagetypes 2018-11-07 19:56:01 -07:00
Sam Edwards 16be0770e7 CMake: Fix libCgGL linkage in FindCg.cmake
This involves both fixing the capitalization of "CgGL" and only adding
libraries to CG_LIBRARIES when they're found.
2018-11-06 02:07:08 -07:00
Sam Edwards 9222bc6d31 CMake: Detect OpenCV/ARToolKit, build p3vision
For now, p3vision is only built if either OpenCV or
ARToolKit is available. It does contain some generic
webcam access code, so it might be worth building it
when that's available.
2018-11-03 22:51:14 -06:00
Sam Edwards 3a5c158b5a CMake: Fix FindVRPN so it also finds VRPN's quat library 2018-11-03 22:51:12 -06:00
Sam Edwards 15a78c55bc CMake: Detect and use HarfBuzz when available 2018-11-02 23:37:26 -06:00
Sam Edwards f701e36aa5 CMake: Detect VRPN and build support for it when present
I inadvertently rewrote FindVRPN.cmake doing this - I didn't
think to check if it already existed before overwriting.
Oh well, the new version is a bit simpler.
2018-11-02 21:08:00 -06:00
Sam Edwards 7de4b39f6e CMake: Put generated Interrogate files under the right build directory
That is, they should appear under the build directory of the
component library they're Interrogating; this is just an
organizational change to keep the cmake/panda/ directory from
accumulating Interrogate clutter.
2018-11-02 01:20:03 -06:00
Sam Edwards 5b973ed837 CMake: Add DirectX 9 support 2018-11-01 22:33:01 -06:00
Sam Edwards 7c42b75ac8 CMake: Update FindCg to discover cgD3D9
This also means renaming "CGDX9" to "CGD3D9" for consistency
with what Nvidia calls it.
2018-11-01 16:31:57 -06:00
Sam Edwards f07b713e8d CMake: Change FindOpenGLES* modules so they don't even try on Apple 2018-10-27 21:11:14 -06:00
Sam Edwards 11a75eab99 CMake: Build OpenGL ES (1&2) display modules
Also reorganizes Package.cmake a little, getting more of the
package discovery logic under the PackageConfig.cmake system.
2018-10-22 01:58:24 -06:00
Sam Edwards 56b211f902 CMake: Fix FindODE's include path finding
It needs to look for the path containing the "ode" directory,
not the "ode" directory itself.
2018-10-19 12:56:11 -06:00
Sam Edwards cefc000235 CMake: Remove PATHS from FindEigen3
Why do we need these? CMake checks the "obvious" paths for us.
2018-10-18 19:27:47 -06:00
Sam Edwards 8dd46eb736 CMake: Redo ODE find module
This defines an ODE::ODE target; it also automatically selects
the correct `dIDESINGLE`/`dIDEDOUBLE` compile-time definition.
2018-10-18 19:27:47 -06:00
Sam Edwards dd5c411e88 CMake: When building metalib components, properly flag SYSTEM include dirs 2018-10-18 13:42:12 -06:00
Sam Edwards b3f1b7d40b Merge branch 'cmake' of https://github.com/treamology/panda3d into cmake
# Conflicts:
#	.travis.yml
#	direct/src/showbase/CMakeLists.txt
#	dtool/dtool_config.h.in
#	dtool/src/prc/CMakeLists.txt
#	panda/src/cocoadisplay/CMakeLists.txt
#	panda/src/express/CMakeLists.txt
#	panda/src/osxdisplay/CMakeLists.txt
2018-10-14 02:26:56 -06:00
Sam Edwards 1e38910d9d CMake: Fix BuildMetalib's BUILDING_ symbol propagation 2018-10-13 15:07:09 -06:00
Sam Edwards 8610b2fceb CMake: Simplify Interrogate's compiler definition discovery
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.
2018-10-13 15:06:57 -06:00
Sam Edwards 32a6552af4 CMake: Make BuildMetalib's link override more like CMake 3.12 2018-10-11 17:38:30 -06:00
Sam Edwards 47b5a50688 CMake: Don't always override target_link_libraries()
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.
2018-10-10 20:16:33 -06:00
Sam Edwards a0d9a931e0 CMake: Simplify target_link_libraries "object" linking shim
This uses generator expressions instead, so that it's no longer
dependent on all linked component libraries existing first.
2018-10-10 20:16:32 -06:00
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 f696bfbfe2 CMake: Clean up run_pzip
This should get rid of stray directories in the build
directory on Windows.
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 0997c6b19c CMake: Don't depend on Python interpreter
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.
2018-10-07 00:51:26 -06:00