panda3d icon indicating copy to clipboard operation
panda3d copied to clipboard

Consider using a dependency manager for the cmake build

Open Clockwork-Muse opened this issue 4 years ago • 1 comments

Description

As the project looks towards moving more completely onto a cmake build, it may be worthwhile to consider using a package manager for dependencies.

There are a number of dependency managers for cmake-based projects - Conan, vcpkg, CPM.cmake, ... - any one of which may help.

Use Case

One of the first required steps to building panda is requiring that dependencies were installed - a dependency manager can ensure that these are collected (not necessarily installed, since that can pollute machine state) automatically. Too, some parts of the build will automatically disable themselves if a dependency is not found, which may be confusing in some scenarios. This may also simplify the dependencies for building the python wheel package as well.

Clockwork-Muse avatar Dec 29 '21 07:12 Clockwork-Muse

Note that at least some dependency managers are cmake-based themselves, which may cause some issues: vcpkg hooks add_library, which causes the panda build to fail due to the resulting competing recursive redefinitions. This can be obviously fixed by not hooking in our own scripts - it's officially discouraged for most cases, should we just provide a custom function regardless of whether we adopt a package manager?

Clockwork-Muse avatar Dec 29 '21 07:12 Clockwork-Muse