Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
99 lines (86 loc) · 2.8 KB
/
Copy pathCMakeLists.txt
File metadata and controls
99 lines (86 loc) · 2.8 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
cmake_minimum_required(VERSION 3.10)
project(WoWDX9Hook)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Ensure compile_commands.json is generated
# Force 32-bit build
set(CMAKE_GENERATOR_PLATFORM Win32)
set(CMAKE_VS_PLATFORM_NAME "Win32")
set(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE "x86")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# Add source files
set(SOURCE_FILES
src/dllmain.cpp
src/hook.cpp
src/spells/SpellManager.cpp
src/spells/auras.cpp
src/spells/castspell.cpp
src/spells/targeting.cpp
src/spells/cooldowns.cpp
src/gui/gui.cpp
src/gui/RotationsTab.cpp
src/gui/tabs/objects_tab.cpp
src/gui/tabs/FishingTab.cpp
src/logs/log.cpp
src/objectManager/objectManager.cpp
src/lua/lua_interface.cpp
src/rotations/RotationEngine.cpp
src/rotations/RotationParser.cpp
src/rotations/RotationLifecycle.cpp
src/rotations/RotationSettings.cpp
src/rotations/RotationExecution.cpp
src/rotations/RotationPriority.cpp
src/rotations/RotationConditions.cpp
src/types/wowobject.cpp
src/types/wowplayer.cpp
src/types/wowunit.cpp
src/types/wowgameobject.cpp
src/utils/memory.cpp
src/fishing/FishingBot.cpp
src/game_state/GameStateManager.cpp
)
# ImGui source files
set(IMGUI_FILES
dependencies/ImGui/imgui.cpp
dependencies/ImGui/imgui_demo.cpp
dependencies/ImGui/imgui_draw.cpp
dependencies/ImGui/imgui_tables.cpp
dependencies/ImGui/imgui_widgets.cpp
dependencies/ImGui/backends/imgui_impl_dx9.cpp
dependencies/ImGui/backends/imgui_impl_win32.cpp
)
# Create shared library
add_library(WoWDX9Hook SHARED ${SOURCE_FILES} ${IMGUI_FILES})
# MinHook
add_library(minhook STATIC
dependencies/MinHook/src/buffer.c
dependencies/MinHook/src/hook.c
dependencies/MinHook/src/trampoline.c
dependencies/MinHook/src/hde/hde32.c
)
target_include_directories(minhook PUBLIC dependencies/MinHook/include)
# Include directories
target_include_directories(WoWDX9Hook PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/spells
${CMAKE_CURRENT_SOURCE_DIR}/dependencies # Ensure dependencies base is included
dependencies/ImGui # For imgui.h, imconfig.h
dependencies/ImGui/backends # For imgui_impl_*.h
dependencies/MinHook/include
dependencies/json-develop/include # Corrected path to json include dir
"$ENV{DXSDK_DIR}/Include"
)
# Link directories
target_link_directories(WoWDX9Hook PRIVATE
"$ENV{DXSDK_DIR}/Lib/x86"
)
# Link libraries
target_link_libraries(WoWDX9Hook PRIVATE
minhook
d3d9
d3dx9
)
# Add the RotationCreator subdirectory
add_subdirectory(RotationCreator)