Skip to content

Create dedicated folder for headers#4

Merged
nikp123 merged 1 commit intonikp123:mainfrom
Rem01Gaming:main
Sep 29, 2025
Merged

Create dedicated folder for headers#4
nikp123 merged 1 commit intonikp123:mainfrom
Rem01Gaming:main

Conversation

@Rem01Gaming
Copy link
Copy Markdown
Contributor

To make things tidy when this project was used as git submodule.

To make things tidy when this project was used as git submodule.

Signed-off-by: Rem01Gaming <[email protected]>
@nikp123
Copy link
Copy Markdown
Owner

nikp123 commented Sep 29, 2025

Any particular reason why this is done? I'm just a bit confused

Why not treat the project directory as the folder thats going to be included?

@nikp123
Copy link
Copy Markdown
Owner

nikp123 commented Sep 29, 2025

Asking, because: Is this some kind of convention or best practice I'm not following or more of a personal taste thing?

@Rem01Gaming
Copy link
Copy Markdown
Contributor Author

On my project, I have a structure in a way that every external libaries are placed into root/external/... folder and added as submodule, then I could add the headers in Android.mk with LOCAL_C_INCLUDES.

Other libaries such as rapidjson and spdlog use this structure so I could add it cleanly but x-watcher doesn't.

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/include \
    $(LOCAL_PATH)/external/rapidjson/include \
    $(LOCAL_PATH)/external/spdlog/include

I don't like adding external libraries on my project's include path, hence i proposed this pr, doing this is just make the overall project structure and integrations cleaner.

If you asking if this are some kind of best practice, I'm not sure but most major libraries also does the same thing too so yeah...

@nikp123
Copy link
Copy Markdown
Owner

nikp123 commented Sep 29, 2025

Seems fine by me in that case, I don't want to deviate from the norm. I will have to add a warning about existing build scripts breaking due to this.

PS: Thanks for the insight. I made this library only because I was frustrated by a lack of a "all-in-one" solution, so I didn't dig deep to find what specific project structure should be the best as C just lets you do whatever you want. (Kind of a trend I'm noticing since I'm writing way more Rust now)

@nikp123 nikp123 merged commit 744f8f9 into nikp123:main Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants