mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
[Add] JuiceModule.cmake function add_juice_module to create modules with source collection, include dirs, linking, and optional compile definitions [Change] Root CMakeLists.txt now calls add_juice_module for core, injector, loader; no need to repeat add_subdirectory per module [Change] target_compile_definitions for module-specific macros (e.g., agent) moved to function end to ensure target exists before setting [Improve] Simplified module management and build clarity
23 lines
616 B
CMake
23 lines
616 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
project(JuiceAgent LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
# output directories
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
# includes
|
|
set(INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/includes)
|
|
|
|
# library - ReflectiveDLLInjection
|
|
add_subdirectory(${INCLUDES}/ReflectiveDLLInjection)
|
|
|
|
include(cmake/JuiceModule.cmake)
|
|
|
|
# modules
|
|
add_juice_module(agent)
|
|
add_juice_module(juiceloader)
|
|
add_juice_module(injector) |