From a251b8996e695c9f403ec879ad89e3a437b1cca9 Mon Sep 17 00:00:00 2001 From: xiaozhou233 Date: Sat, 15 Aug 2026 12:48:23 +0800 Subject: [PATCH] Feat: add libagent CMakeLists.txt --- .gitignore | 4 +++- CMakeLists.txt | 1 + src/libagent/CMakeLists.txt | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/libagent/CMakeLists.txt diff --git a/.gitignore b/.gitignore index a007fea..74f4875 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -build/* +build/ +.cache/ +*.log diff --git a/CMakeLists.txt b/CMakeLists.txt index e4dc3e6..0ac438f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,3 +19,4 @@ add_subdirectory(${CMAKE_SOURCE_DIR}/includes/ReflectiveDLLInjection) add_subdirectory(${SRC_DIR}/libloader) add_subdirectory(${SRC_DIR}/injector) add_subdirectory(${SRC_DIR}/libinject) +add_subdirectory(${SRC_DIR}/libagent) diff --git a/src/libagent/CMakeLists.txt b/src/libagent/CMakeLists.txt new file mode 100644 index 0000000..033619e --- /dev/null +++ b/src/libagent/CMakeLists.txt @@ -0,0 +1,19 @@ +file( + GLOB_RECURSE + agent_sources + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/*.c +) + +add_library(agent SHARED ${agent_sources}) + +target_include_directories(agent PRIVATE + ${CMAKE_SOURCE_DIR}/includes + ${CMAKE_SOURCE_DIR}/includes/jvm + ${CMAKE_SOURCE_DIR}/includes/jvm/win32 + ${CMAKE_CURRENT_SOURCE_DIR}/includes +) + +target_link_libraries(agent PRIVATE + jvm +)