gazebosim / gz-cmake

A set of CMake modules that are used by the C++-based Gazebo projects.
https://gazebosim.org/libs/cmake
Apache License 2.0
27 stars 31 forks source link

Fixed finding Ogre2 on Windows+Conda. #384

Closed peci1 closed 1 year ago

peci1 commented 1 year ago

🦟 Bug fix

Fixes #357

Summary

This seems to do the trick on Windows+Conda (following Harmonic install tutorial). Potential for unwanted side-effects on other OSs seem small to me.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

traversaro commented 1 year ago

Cool! My fear was to break vcpkg CI builds with ogre-next, but as of the comment in https://github.com/gazebosim/gz-rendering/pull/897#issuecomment-1704364153 there is not such CI, probably we are good to do, at least for me. Just a small nitpick, can you update the docs of the Find script to reflect the changes? See the docs changes in https://github.com/gazebosim/gz-cmake/pull/357/files .

peci1 commented 1 year ago

but as of the comment in gazebosim/gz-rendering#897 (comment) there is not such CI, probably we are good to do, at least for me

Question is whether that is expected :) I'm not good enough in reading buildfarm logs to tell if the tests actually worked at some point or not for Windows.

can you update the docs of the Find script

Done

traversaro commented 1 year ago

but as of the comment in gazebosim/gz-rendering#897 (comment) there is not such CI, probably we are good to do, at least for me

Question is whether that is expected :) I'm not good enough in reading buildfarm logs to tell if the tests actually worked at some point or not for Windows.

This is a good point. Probably @j-rivero or @azeey know more on this.

mjcarroll commented 1 year ago

I'm going to try to run this through on the vcpkg version using our ci_matching_branch trick and see what happens.

mjcarroll commented 1 year ago

https://github.com/gazebosim/gz-rendering/pull/899 :crossed_fingers:

mjcarroll commented 1 year ago

this still doesn't seem to work with me. I have conda and ogre-next, is there something else that I'm missing here?

traversaro commented 1 year ago

this still doesn't seem to work with me. I have conda and ogre-next, is there something else that I'm missing here?

ogre-next is from binaries or from source?

mjcarroll commented 1 year ago

ogre-next is from binaries or from source?

Binaries, 2.3.1

peci1 commented 1 year ago

Could you put a few prints to the install/gz-cmake/../FindGzOGRE2.cmake to figure out why it isn't found?

peci1 commented 1 year ago

I have:

$ conda list ogre
# packages in environment at D:\Programy\conda-envs\ign8:
#
# Name                    Version                   Build  Channel
ogre                      1.10.12             h4c42d57_11    conda-forge
ogre-next                 2.3.1                h606bb5d_4    conda-forge
traversaro commented 1 year ago

ogre-next is from binaries or from source?

Binaries, 2.3.1

Can you post your mamba list? Another possible problem could be if you are missing pkg-config.

mjcarroll commented 1 year ago

Well, to make things complicated, I'm trying out pixi (no pixi list yet!). I do have ogre, ogre-next, and pkg-config installed, though. I'm going to do some advanced cmake debugging (tm) to see what's going on.

traversaro commented 1 year ago

Well, to make things complicated, I'm trying out pixi (no pixi list yet!). I do have ogre, ogre-next, and pkg-config installed, though. I'm going to do some advanced cmake debugging (tm) to see what's going on.

If you have mamba or micromamba installed, you can activate the .pixi/env environment with mamba and then do mamba list. Otherwise the pixi.toml file contain almost the same info of a mamba list.

mjcarroll commented 1 year ago

Okay, I have confirmed that this works for me locally and it LGTM.