Skip to content

Migrating build system to cmake#3413

Open
hemagx wants to merge 40 commits into
masterfrom
cmake
Open

Migrating build system to cmake#3413
hemagx wants to merge 40 commits into
masterfrom
cmake

Conversation

@hemagx

@hemagx hemagx commented May 23, 2026

Copy link
Copy Markdown
Contributor

Pull Request Prelude

Changes Proposed

This Pull request changes our compilation generation tool to cmake so unify all platforms under a single umberalla, we also added conan as our dependency manager to get rid of as much of 3rdparty as possible and also the DLLs deployed for windows.

Issues addressed:

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@hemagx hemagx added this to the Release v2026.05 milestone May 23, 2026
@hemagx hemagx changed the base branch from stable to master May 23, 2026 18:17

@MishimaHaruna MishimaHaruna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review - will continue later (I'm going commit by commit, so some comments might be outdated, feel free to close them)

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread cmake_modules/LanguageFeatureHelper.cmake Outdated
Comment thread cmake_modules/LanguageFeatureHelper.cmake Outdated
Comment thread cmake_modules/CompilerFlagHelpers.cmake Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread src/common/CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread src/char/CMakeLists.txt Outdated
Comment thread src/login/CMakeLists.txt Outdated
Comment thread src/map/CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread cmake_modules/GeneralHelpers.cmake Outdated
Comment thread cmake_modules/GeneralHelpers.cmake Outdated
Comment thread src/plugins/HPMHooking/CMakeLists.txt Outdated
Comment thread src/plugins/sample.c
Comment thread src/plugins/sample/sample.c Outdated
Comment thread src/plugins/sample/sample.h Outdated
Comment thread tools/HPMHookGen/CMakeLists.txt
Comment thread 3rdparty/libconfig/CMakeLists.txt Outdated
@MishimaHaruna MishimaHaruna force-pushed the cmake branch 7 times, most recently from ff174a0 to 3742918 Compare May 25, 2026 00:15
Comment thread src/common/core.c Outdated
Comment thread 3rdparty/libconfig/libconfig.h
Comment thread src/common/sysinfo.c
#include <stdlib.h> // atoi
#ifdef WIN32
# include <windows.h>
# include <winternl.h>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this header providing here? It might be worth adding a comment to it since it's a quite unusual (and not very recommended) header to include

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the NTSTATUS macro used later in code, idk why it didn't require it before, but since move to cmake it no longer saw it until this header is used :x

Comment thread CMakeLists.txt Outdated
Comment thread src/common/atomic.h
Comment thread src/common/atomic.h
Comment thread tools/ci/travis.sh Outdated
Comment thread tools/ci/travis.sh Outdated
Comment thread .gitignore Outdated
Comment thread CMakeLists.txt
@@ -0,0 +1,570 @@
# This file is part of Hercules.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script requires that the user passes some arguments (in particular the conan ones), that might be hard to remember. They should be documented in the project readme, and perhaps it would be nice to provide a convenience script (.sh and .bat/.ps1) with reasonable defaults

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
hemagx added 3 commits June 14, 2026 05:19
…n empty `./configure` run

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…ng on our own

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
… 3rdparty source folder

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
hemagx added 28 commits June 14, 2026 05:30
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…n CMakeFileLists.txt file

This would allow for more complex multi-file plugins and better customized build rules per plugin.
Due to this change any plugin that includes HPMHooks using path `plugins/HPMHooking.h` will now have to include it as `plugins/HPMHooking/HPMHooking.h`

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…ile tends to have possible false positives

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…d unnecessirly

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…nflict with windows setup and corrected the RPATH for plugins to reflect directory structure

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…oesn't depend on libbacktrace now the core will save current executable path to core->executable_path

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…d change its name to herc-plugins

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…changes for a 64bit build

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
… sanitizer build as conan doesn't support preview releases

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
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.

3 participants