Files
JuiceAgent/CMakeLists.txt
T
xiaozhou233 32f2d5c116 [Refactor] Modular CMake setup with unified module handling
[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
2025-10-08 03:31:45 +08:00

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)