-
Notifications
You must be signed in to change notification settings - Fork 431
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
incorrect cmake configuration / include layout post installation #532
Comments
Hey, I'm primarily a python guy so kinda understand what you are talking about. If you make a PR, I can certainly review it and see if the original author can as well. |
Hey @pseudo-rnd-thoughts , I can understand that changing the project layout is a hassle, so I haven't immediately gone to work on it. As long as there aren't many other developments happening on the repo (in branches/forks), I do think it would be the overall path of least resistance. I will give it a try and report back. |
I have made the necessary changes for option 1 on my fork here: https://github.com/maichmueller/Arcade-Learning-Environment The CI runs as well except for the wheel RAM tests in python 3.9+ (3.8 works though on all platforms. I am a little puzzled by this error): https://github.com/maichmueller/Arcade-Learning-Environment/actions/runs/9563036581 |
Thanks for doing that @maichmueller, could you make it a PR as it is bit difficult to see all the changes as there are several commits. |
I created a draft PR @pseudo-rnd-thoughts , let me know what you can identify there. I have tried multiple things to fix the CI errors. My observations:
|
I have been working on packaging this project for later use in c++ with conan, the package manager.
During this process I believe to have come across an inconsistency in the c++ layout of include headers:
In the source tree everything lives directly in
src
, i.e header files start directly at e.g.src/ale_interface.hpp
.The include directories are also mapped to
src
for the c++ targets insrc/CMakeLists.txt
:However, for installation the layout is changed to a project-named one (which is correct to do)
{install_prefix}/include/ale
:The problem that this creates is the following now:
In
ale_interface.hpp
:and in
emucore/OSystem.hxx
:This works in the src layout.
#include emucore/OSystem.hxx
inale_interface
will always work becauseemucore
is found via a relative search from the interface file.But
#include "emucore/Sound.hxx"
cannot resolveemucore
from a relative search, since the including file (OSystem.hxx
) is inside the included folder (emucore
), so it will need to be found relative to the include-directories (src
at build-time). But at install-time these are now changed toale
.I see 2 ways to fix this:
src/ale
and prepend all includes for project files withale/
, e.g. `#include "ale/emucore/OSystem.hxx".I believe option 1 is less work and can be achieved with the help of some regex search and an IDE. Option 2 is more work in case there a many files that have made this mistake.
I could provide a PR if you agree with this. Otherwise, let me know if I got something wrong :)
The text was updated successfully, but these errors were encountered: