-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (43 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
project(C2LinuxImplant VERSION 0.0.0 LANGUAGES CXX C)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 17)
##
## Conan Dependencies
##
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
find_package(OpenSSL REQUIRED)
find_package(httplib REQUIRED)
include_directories(${CMAKE_INCLUDE_PATH})
include_directories(thirdParty)
##
## Config Tests et Logs
##
option(WITH_TESTS "Compile for tests" OFF)
message(STATUS "WITH_TESTS is set to ${WITH_TESTS}")
add_definitions(-DBUILD_IMPLANT)
if(NOT WITH_TESTS)
message(STATUS "[-] Tests are disabled.")
else()
message(STATUS "[+] Tests are enabled.")
add_definitions(-DBUILD_TESTS)
endif()
##
## Build
##
add_subdirectory(libs)
add_subdirectory(thirdParty)
include_directories(thirdParty/base64)
include_directories(thirdParty/donut/include)
if(WITH_TESTS)
enable_testing()
endif()
add_subdirectory(core/modules)
add_subdirectory(core/beacon)
if(WITH_TESTS)
add_subdirectory(core/beacon/tests)
add_subdirectory(core/listener/tests)
endif()
include_directories(core/beacon)
include_directories(core/modules/ModuleCmd)
add_subdirectory(beacon/beacon)