Skip to content

Project source code folder structure adjustment #1646

Open
@smilediver

Description

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
)

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions