-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
🚀 Replace vcpkg with conan #641
base: master
Are you sure you want to change the base?
Conversation
f10011e
to
c7a34e6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1f6bfe1
to
705a375
Compare
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.
A little comment on vhacd-util: As far as I know this is somewhat legacy. Our engine will automatically generate collision hulls and doesn't use vhacd-util for that. vhacd-util could be very useful for generating performant collision hulls for more complicated objects, but I don't think anyone does that. In fact, I have never even tried using it, and don't even know if it works.
tc.variables["BUILD_TOOLS"] = "OFF" | ||
tc.variables["USE_CUDA"] = "OFF" | ||
if self.settings.os == "Linux": | ||
tc.variables["CMAKE_CXX_FLAGS"] = "-march=msse3 -fPIC" |
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 would break on aarch64, which technically Overte can currently run on.
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.
Apparently, the -march=msse3
just gets ignored on aarch64 without even throwing a warning.
"qt*:qtxmlpatterns": "True", | ||
"glad*:spec": "gl", | ||
"glad*:gl_profile": "core", | ||
"glad*:gl_version": "4.6", |
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.
Not sure if you know, but Overte supports multiple OpenGL versions. For example, it will fall back to OpenGL 4.1 if OpenGL 4.6 is not available. It can also be built for OpenGL ES 3.2.
I don't know how this part of the Conan code works though.
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 is just the targeted version for glad, I just copied the settings from the vcpkg package
@@ -0,0 +1,8 @@ | |||
[settings] | |||
os=Windows | |||
arch=x86_64 |
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.
We don't currently have any plans for an aarch64 Windows version, but would it make sense to have the profile name reflect the architecture?
tools/shadergen.py
Outdated
@@ -217,7 +217,7 @@ def processCommand(line): | |||
executeSubprocess(scribeArgs) | |||
|
|||
# Generate the un-optimized output | |||
executeSubprocess([glslangExec, '-V110', '-o', upoptSpirvFile, unoptGlslFile]) | |||
executeSubprocess([glslangExec, '-V100', '-o', upoptSpirvFile, unoptGlslFile]) |
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.
Could you explain what this change is doing? Looking it up online it seems like this switches to an older Visual Studio toolchain?
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.
The glslangValidator from the conan package is too old to support that version, it needs to be updated
A comment on building this on Linux: # Install python3 virtual environment
sudo apt install python3-venv
# Create a virtual environment in the Overte codebase
python3 -m venv .venv
# Install pip dependencies
.venv/bin/pip3 install conan
# Now one can run conan
.venv/bin/conan profile detect |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Am I understanding it right that Conan is supposed to only get dependencies of its own if the system doesn't already provide them? |
That is really dependent on how the conan recipes are written. |
This comment was marked as resolved.
This comment was marked as resolved.
It would be nice if you could put a README into the conan-recipes directory on how to consume those and how to update them. It seems like I can build node for example using a command like
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
Building libnode through conan fails on Ubuntu 20.04. |
The source for the package is here: |
becf99d
to
8d93025
Compare
e98cdb9
to
c699930
Compare
…stem OpenSSL package. (Crashpad depends on libcurl.)" This reverts commit dd51cb9.
self.requires("artery-font-format/1.0.1") | ||
self.requires("bullet3/3.25") | ||
self.requires("cgltf/1.14@overte/stable") | ||
# self.requires("crashpad/cci.20220219" ) # Broken |
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.
Since we barely use Crashpad, and it is a huge pain to build, I think we should just leave it disabled for now. We can take a look at it again once Conan is merged.
Building on Ubuntu 20.04 currently fails due to conan-io/conan-center-index#26806 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
6caebac
to
a2591ab
Compare
This PR is still a work in progress, but the interface should built and run on both Windows and Linux
TODO
cmake/externals
with conan packagesHow to build on Windows with conan
Add the remote
conan remote add overte https://artifactory.overte.org/artifactory/api/conan/overte
Install the deps with conan
conan install . -b missing -pr:b=tools/conan-profiles/vs-19-release -pr=tools/conan-profiles/vs-19-release -of build
Generate the VS project files
cmake --preset conan-default
(Note: Currently only the Release build can be built)
How to build on Linux with conan
Let conan detect the build environment
conan profile detect
Add the remote
conan remote add overte https://artifactory.overte.org/artifactory/api/conan/overte
Install the deps with conan
conan install . -s build_type=Release -b missing -of build
Generate the make files
cmake --preset conan-default
Build the interface
cd build && make