Skip to content
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

Project source code folder structure adjustment #1646

Open
smilediver opened this issue Feb 1, 2024 · 3 comments
Open

Project source code folder structure adjustment #1646

smilediver opened this issue Feb 1, 2024 · 3 comments
Labels
help wanted Extra attention is needed pinned

Comments

@smilediver
Copy link
Contributor

Right now all project files are inside core folder and the engine adds a lot of unnecessary include paths to the project, which makes the setup brittle to header conflicts. I'm proposing to move all files inside core to core/axmol. This would allow to add core path for includes and use #include <axmol/2d/Node.h>, instead of something like #include <axmol/core/2d/Node.h> or raw #include <2d/Node.h> which is too basic and is exposed to conflicts with headers from the project or other external libraries.

And this setup:

target_include_directories(${_AX_CORE_LIB}
    PUBLIC ${_AX_ROOT}
    PUBLIC ${_AX_ROOT}/thirdparty
    PUBLIC ${_AX_ROOT}/extensions
    PUBLIC ${_AX_ROOT}/core
    PUBLIC ${_AX_ROOT}/core/platform

    INTERFACE ${_AX_ROOT}/thirdparty
    INTERFACE ${_AX_ROOT}/extensions
    INTERFACE ${_AX_ROOT}/core/base
    INTERFACE ${_AX_ROOT}/core/audio
    INTERFACE ${_AX_ROOT}/core/platform/${PLATFORM_NAME}
)

should be reduced to something like this:

target_include_directories(${_AX_CORE_LIB}
    PUBLIC ${_AX_ROOT}/core
    PUBLIC ${_AX_ROOT}/thirdparty
)
@halx99 halx99 added the help wanted Extra attention is needed label Feb 1, 2024
@rh101
Copy link
Contributor

rh101 commented Feb 2, 2024

While this is a good idea, it is a breaking change, so perhaps it would be best to leave it for the v2.2 release?

@halx99
Copy link
Collaborator

halx99 commented Feb 2, 2024

While this is a good idea, it is a breaking change, so perhaps it would be best to leave it for the v2.2 release?

Yes

@halx99 halx99 added this to the next milestone Feb 2, 2024
@halx99 halx99 linked a pull request Feb 4, 2024 that will close this issue
6 tasks
@halx99 halx99 removed a link to a pull request Feb 4, 2024
6 tasks
Copy link

stale bot commented Apr 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 9, 2024
@halx99 halx99 modified the milestones: next, 2.2.0 Apr 10, 2024
@halx99 halx99 added the pinned label Apr 10, 2024
@stale stale bot removed the wontfix This will not be worked on label Apr 10, 2024
@halx99 halx99 modified the milestones: 2.3.0, 3.0.0 Aug 29, 2024
@halx99 halx99 removed this from the 3.0.0 milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed pinned
Projects
None yet
Development

No branches or pull requests

3 participants