-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
76 lines (69 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cmake_minimum_required(VERSION 3.24)
project(re_overlay)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_GENERATOR_PLATFORM x64)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_library(re_overlay SHARED)
target_sources(re_overlay PRIVATE
src/Speedrun.cpp
src/Speedrun.h
src/utilities/Mod.h
src/enums.h
src/utilities/Config.h
src/utilities/Config.cpp
src/utilities/String.cpp
src/utilities/String.h
src/main.cpp
src/utilities/Mod.h
src/imgui/font_robotomedium.hpp
src/imgui/imgui_impl_dx11.cpp
src/imgui/imgui_impl_dx12.cpp
src/imgui/imgui_impl_dx11.h
src/imgui/imgui_impl_dx12.h
src/imgui/imgui_impl_win32.cpp
src/imgui/imgui_impl_win32.h
src/imgui/imgui.h
src/imgui/imgui.cpp
src/imgui/imgui_internal.h
src/imgui/imgui_widgets.cpp
src/imgui/imgui_tables.cpp
src/imgui/imgui_draw.cpp
src/rendering/d3d11.cpp
src/rendering/d3d11.hpp
src/rendering/d3d12.cpp
src/rendering/d3d12.hpp
src/rendering/shared.hpp
)
add_library(reframework INTERFACE)
target_include_directories(reframework INTERFACE "REFramework/include")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT /O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MT /O2")
string(REGEX REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
target_link_libraries(re_overlay PUBLIC reframework d3d12 d3d11)
install(
TARGETS
re_overlay
DESTINATION
bin
COMPONENT
re_overlay
)
set(BENCHMARK_ENABLE_TESTING NO)
include(FetchContent)
FetchContent_Declare(
googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG origin/main
)
FetchContent_MakeAvailable(googlebenchmark)
add_executable (overlay_benchmarks bench/benches.cpp bench/benches.h)
target_link_libraries(overlay_benchmarks benchmark::benchmark)
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
target_link_libraries(overlay_benchmarks Shlwapi)
endif()