-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
107 lines (85 loc) · 2.78 KB
/
Copy pathCMakeLists.txt
File metadata and controls
107 lines (85 loc) · 2.78 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
cmake_minimum_required(VERSION 3.15)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
endif()
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
# Bootstrap cmkr and automatically regenerate CMakeLists.txt
include("cmake/cmkr.cmake" OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Create a configure-time dependency on cmake.toml to improve IDE support
configure_file(cmake.toml cmake.toml COPYONLY)
endif()
include("cmake/msvc-static-runtime.cmake")
include("cmake/msvc-configurations.cmake")
project(x64dbg-automate)
if(CMKR_ROOT_PROJECT AND NOT CMKR_DISABLE_VCPKG)
include(FetchContent)
# Fix warnings about DOWNLOAD_EXTRACT_TIMESTAMP
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
message(STATUS "Fetching vcpkg (2025.01.13)...")
FetchContent_Declare(vcpkg URL "https://github.com/microsoft/vcpkg/archive/refs/tags/2025.01.13.tar.gz")
FetchContent_GetProperties(vcpkg)
if(NOT vcpkg_POPULATED)
FetchContent_Populate(vcpkg)
include("${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake")
endif()
endif()
include(FetchContent)
message(STATUS "Fetching x64dbg...")
FetchContent_Declare(x64dbg
URL
"https://sourceforge.net/projects/x64dbg/files/snapshots/snapshot_2026-05-27_12-11.zip"
URL_HASH
SHA1=4f70bf300e79e0a88d59ab3bfe68d22daf003cea
)
FetchContent_MakeAvailable(x64dbg)
include("cmake/x64dbg.cmake")
# Packages
find_package(cppzmq REQUIRED)
find_package(msgpack-cxx REQUIRED)
find_package(Boost REQUIRED)
# Target: x64dbg-automate
set(CMKR_TARGET x64dbg-automate)
find_path(DETOURS_INCLUDE_DIRS "detours/detours.h" REQUIRED)
find_library(DETOURS_LIBRARY detours REQUIRED)
add_library(detours_target STATIC IMPORTED)
set_target_properties(detours_target PROPERTIES
IMPORTED_LOCATION "${DETOURS_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${DETOURS_INCLUDE_DIRS}"
)
set(x64dbg-automate_SOURCES
"src/plugin.cpp"
"src/pluginmain.cpp"
"src/xauto_cmd.cpp"
"src/xauto_log.cpp"
"src/xauto_server.cpp"
"src/plugin.h"
"src/pluginmain.h"
"src/resource.h"
"src/xauto_cmd.h"
"src/xauto_log.h"
"src/xauto_server.h"
"src/plugin.rc"
cmake.toml
)
x64dbg_plugin(x64dbg-automate)
target_sources(x64dbg-automate PRIVATE ${x64dbg-automate_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${x64dbg-automate_SOURCES})
target_compile_features(x64dbg-automate PUBLIC
cxx_std_20
)
target_link_libraries(x64dbg-automate PUBLIC
cppzmq
msgpack-cxx
detours_target
)