Conversation
This should allow Zydis to find Zycore in more situations automatically. Most importantly, `find_package(Zycore)` is now something that we try automatically. This should allow distributions that ship Zycore as a separate package to do so more easily without having to delve into out CMake logic to discover the `ZYAN_SYSTEM_ZYCORE` option.
| message(FATAL_ERROR "ZYAN_SYSTEM_ZYCORE set but no system-installed Zycore found") | ||
| endif () | ||
|
|
||
| find_package(Git QUIET) |
There was a problem hiding this comment.
We could possibly change this block to the newer CMake 'FetchContent' APIs. However, not sure if we would have to bump our CMake version requirement to do so.
Edit: It might introduce some overhead, as we would have to determine the correct commit hash, that's used for the Git submodule.
There was a problem hiding this comment.
I suspect we'd have to maintain a separate pinned revision in the CMakeLists then, no? With the existing approach we're using the revision stored in git's meta-info. Or does FetchContent explicitly support this somehow?
There was a problem hiding this comment.
I think we would have to either maintain it in two places or extract the hash from the repository config by parsing the Git files.
Not sure if it's worth it. Probably not. Git should be installed on most dev machines anyways.
The changes in this PR should allow Zydis to find Zycore in more situations automatically. Most importantly,
find_package(Zycore)is now something that we try automatically. This should allow distributions that ship Zycore as a separate package to do so more easily without having to delve into out CMake logic to discover theZYAN_SYSTEM_ZYCOREoption.I tested:
-DZYAN_SYSTEM_ZYCORE)