-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: use conan for dependencies #1818
base: master
Are you sure you want to change the base?
Conversation
libgl-dev \ | ||
libglu-dev \ | ||
xorg-dev \ | ||
libxcb1-dev \ | ||
libxcb-util-dev \ | ||
libxcb-render-util0-dev \ | ||
libxcb-xkb-dev \ | ||
libxcb-icccm4-dev \ | ||
libxcb-image0-dev \ | ||
libxcb-keysyms1-dev \ | ||
libxcb-xinerama0-dev \ | ||
libxcb-cursor-dev \ | ||
libxcb-composite0-dev \ | ||
libxcb-ewmh-dev \ | ||
libxcb-res0-dev \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are added because conan's xorg/system
package uses system packages.
@@ -0,0 +1,9 @@ | |||
#!/bin/bash | |||
|
|||
conan graph info \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prints out useful info (i.e. what all packages are being built and what packages are depending on other packages)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's non-obvious enough to require a comment here, it probably warrants a proper comment in the file. Ditto for the other one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do so, I mostly commented as I'm not sure how familiar people are with conan
self.options["glew"].with_glu = "system" | ||
self.options["openal-soft"].shared = True | ||
if self.settings.os == "Linux": | ||
self.options["sdl"].wayland = False # Disable wayland build for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I use engine natively on Wayland
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now I had a lot of issues with the SDL recipe to actually build with wayland. I'll try and get it working before making the PR ready
This is gonna be a draft because there are still some things that need to be worked out. But this should be a decent proof of concept.
Note this is based on top of #1746 so the file diff will be against that
I would love feedback and if y'all are on linux try this PR out (note you have to rebuild the docker image locally).
Goal of this work
The goal of this work is to make the numerous dependencies of Recoil consistent across platforms. Right now Linux, Windows MinGW, and Windows MSVC all use different dependency versions. As part of this, the intent is to make it very easy to add new dependencies instead of having to wrangle them into the build system as submodules or add them to a completely different repo (e.g. spring-static-libs).
A secondary goal is to make it significantly easier for new developers to get started. The ideal workflow is:
conan install .
cmake
andcmake --build
Caveats
pr-downloader
(see below)Patch required for pr-downloader
More information
The docker image will generate (and mount as a volume) a new directory alongside
.cache
called.conan2-{linux|windows}
. This is the Conan home directory and will persist so you don't have to rebuild binaries all the time. Deleting this folder will make conan to rebuild all dependencies the next time you run a build.The conan "build folder" (i.e. that contains all the cmake scripts and so on) is in
build-{linux|windows}/conan
.There is a new stage in the docker v2 build script called "deps". You can pass in the
--deps
flag to just install conan dependencies. This will re-use any binaries of dependencies that are cached.I'll make a PR for the tool