Skip to content

Add CMake installation support#43

Open
4x11 wants to merge 2 commits intoEmberEmu:masterfrom
4x11:master
Open

Add CMake installation support#43
4x11 wants to merge 2 commits intoEmberEmu:masterfrom
4x11:master

Conversation

@4x11
Copy link
Copy Markdown
Contributor

@4x11 4x11 commented Apr 18, 2026

Add CMake install support

  • Refactored root CMakeList.txt and include/CMakeLists.txt
  • Added install rules
  • Added namespace alias hexi::hexi

Breaking changes: none.

@Chaosvex
Copy link
Copy Markdown
Member

Chaosvex commented Apr 18, 2026 via email

@4x11
Copy link
Copy Markdown
Contributor Author

4x11 commented Apr 18, 2026

I have extended the CMakeLists.txt to make Hexi easier to integrate into other projects.
Now it supports two standard ways of using the library:

  1. In‑tree (without installation)
    You can simply add Hexi via add_subdirectory(path/to/hexi) and then link with target_link_libraries(your_app PRIVATE hexi::hexi).

  2. Installed (with find_package())
    After running cmake --install we can do find_package(hexi REQUIRED) and link the same hexi::hexi target.

With these changes the library can now be included in code as:

#include <hexi/hexi.h>

And i think it would be great if you could add this usage information to your README.md.

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