-
Notifications
You must be signed in to change notification settings - Fork 238
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
Proposal: make the project side-by-side installable with Ogre (1.x) #232
Comments
In Ogre-Next we're encouraging out-of-source builds over system installation builds due to multiple reasons:
System-level installations are fine if you're e.g. a Debian maintainer and ensure all system packages are built with the same version and same settings. Although that also means lowest common denominator. e.g. if a package needs That being said, there are cases where it's useful (such as gazebo's), so these changes may be less disruptive than you think:
Sounds slightly disruptive, but it would break only a few CMake scripts that are easy to fix
Changing libOgre* to libOgreNext* is very disruptive. I'd much prefer changing the much more harmless OGRE_LIB_DIRECTORY change
50/50 disruptive. Depends on the project (i.e. some do Fortunately a little bit of "Search & Replace in files" from multiple IDEs should easily solve this problem.
I don't see this being a problem at all
I don't know how disruptive this is. I'll ask Eugene his thoughts on the topic. |
Clearly identify |
Thanks Matias for the answer, some comments inline:
Thanks for the details on the stability of Ogre code and the reasons for recommending against binary distribution. I think that they fit well into what has been the software development techniques over the last decades and the pros and cons of the different approaches (even with some approaches in the middle). It is not my intention trying to change the software recommendations but also work on having a binary distribution which is something valuable for some use cases. Hopefully, as you said, we can live with both approaches with some small changes :)
This is the only point that I'm encouraging to change, getting ABI stability on patch versions would be really valuable.
I'm happy that we three are agree that is desired change to be made, I'll send the PR.
Understood.
Agree, we should be able to handle the change in source code.
Perfect.
For the own project should not be really relevant nor difficult to change hopefully. It goes inline with the rest of the changes proposed. For the rest of the software out there using CMake/pkg-config to find Ogre-Next development libraries and headers they will need to change just the name. Thanks again Matias, Silvio. |
This one has been merged manually. Thanks for your PR! |
Wow, thanks! A good first step. However, if you don't mind @darksylinc , would you mind if we leave this issue open to track the changes needed to complete the proposal? |
Motivation
It would be great to be able to install this software project in a system that already has installed the previous
ogre 1.x
. Given that both projects are being developed and maintained there are some use cases where someone wants to have both installed to use them in a third party software. This is the case of the library ignition-rendering which has support for both.We, at Open Robotics, are currently generating a Debian/Ubuntu package that is being installed together with
ogre-1.x
. To do so we are using-DOGRE_LIB_DIRECTORY
to injectlib/$(DEB_HOST_MULTIARCH)/OGRE-$(OGRE_VERSION)
and our packaging scripts are moving software pieces into a "versioned" directory (OGRE-2.2
) and modifying pkgconfig/cmake to be compatible with this change.I believe that these changes would be best hosted in the buildsystem of ogre-next so from source installations can also be installed in the same way.
Please note that I’m not proposing the changes needed to have a third party project being able to compile and link against both ogre-1.x and ogre-next at the same time, which would require some very intrusive changes in different levels.
Changes required
Thinking on the changes needed to make the project side-by-side installable with Ogre 1.x:
/ogre-next/
subdirectory by default to avoid conflicting with Ogre 1.x libraries since library names are the same. Alternatively/additionally the libraries could be renamed from libOgre to libOgreNext.ogre-next
instead of justogre
.I'm probably missing some pieces here. Just brainstorming a little bit what I was able to found. Please feel free to correct or add the missing parts.
Migration
For third party software using CMake/pkg-config with a system installation
The changes in pkgconfig and CMake modules should probably be enough to hide the modified paths and allow the consumers of the project to keep things working.
Renaming pkgconfig and cmake modules installed could be the biggest problem for migrations in this scenario, since all users should need to modify calls to find the project. We could approach this problem by having a deprecation cycle long enough to give users time to migrate. So when people use:
find_package(Ogre)
the thing still works but generates a warning asking users to update to `find_package(Ogre-Next).Other kind of installations
I think that there is a little we can do to fix other build systems (i.e: bazel, manual Makefiles, etc.), they will need to be fixed to the adapt to the new paths.
I have no experience with other kind of installations, but can probably provide advise if needed.
Thanks.
The text was updated successfully, but these errors were encountered: