Rebzzel / kiero

Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.
MIT License
1.03k stars 219 forks source link

feat: support for CMake build system #43

Open alextwothousand opened 3 years ago

alextwothousand commented 3 years ago

As I mostly use CMake for building C/C++ programs, I thought it would be convenient if a CMakeLists file was available, to allow people to just add_subdirectory this library, or use CMake's FetchContent library.

I also plan on writing C bindings for the kiero library, and so, having CMake support would make it that much easier!

Rebzzel commented 3 years ago

Hello, @alextwothousand. Nice idea, will be implemented in new (>v0.13.0) update. Have nice day!

Curve commented 3 years ago

I have written a small CMakeLists to make this project work with CMake in a convenient way here: https://github.com/Curve/kiero-cmake

The project allows configuration of the render backend through cmake as well as enabling the usage of minhook through cmake, maybe it can be of help for you ^^

The current implementation of my CMakeLists removes the defines in kiero.h in order to define them itself through the CMakeLists, this is quite a hacky solution but it doesn't work with the current configuration implementation (#8 could be of use here)

Rebzzel commented 3 years ago

@Curve, uff, looks good.

The current implementation of my CMakeLists removes the defines in kiero.h in order to define them itself through the CMakeLists, this is quite a hacky solution but it doesn't work with the current configuration implementation (#8 could be of use here)

I think the new implementation (^0.13.0) will solve similar problems (there is a very user-friendly file for this).

PS:

I am very sorry that the update has not been released yet. Unfortunately I'm still very busy to release it. Please be patient. Thank you.

Curve commented 3 years ago

@Rebzzel thanks ^^

And no problem, take all the time you need :D