forked from nbarrios/arcdps-uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
105 lines (89 loc) · 2.72 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
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
cmake_minimum_required(VERSION 3.15.0)
cmake_policy(SET CMP0091 NEW)
project(arcdps_uploader LANGUAGES CXX C)
find_package(CURL CONFIG REQUIRED)
find_package(cpr CONFIG REQUIRED)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(GW2_DIR "" CACHE PATH "GW2 Directory")
set(SOURCE
arcdps_uploader/arcdps_uploader.cpp
arcdps_uploader/arc_logging.cpp
arcdps_uploader/Aleeva.cpp
arcdps_uploader/Uploader.cpp
arcdps_uploader/Settings.cpp
arcdps_uploader/Log.cpp
arcdps_uploader/imgui/imgui.cpp
arcdps_uploader/imgui/imgui_demo.cpp
arcdps_uploader/imgui/imgui_draw.cpp
arcdps_uploader/imgui/imgui_tables.cpp
arcdps_uploader/imgui/imgui_widgets.cpp
arcdps_uploader/imgui/imgui_stdlib.cpp
arcdps_uploader/loguru.cpp
arcdps_uploader/sqlite3.c
revtc/Revtc.cpp
)
set(HEADERS
arcdps_uploader/arcdps_uploader.h
arcdps_uploader/arcdps_defs.h
arcdps_uploader/arc_logging.h
arcdps_uploader/Uploader.h
arcdps_uploader/Settings.h
arcdps_uploader/Log.h
arcdps_uploader/imgui/imgui.h
arcdps_uploader/imgui/imgui_internal.h
arcdps_uploader/imgui/imconfig.h
arcdps_uploader/imgui/imstb_rectpack.h
arcdps_uploader/imgui/imstb_textedit.h
arcdps_uploader/imgui/imstb_truetype.h
arcdps_uploader/imgui/imgui_stdlib.h
)
add_library(d3d9_uploader SHARED
${SOURCE}
${HEADERS}
)
set_property(TARGET d3d9_uploader PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
include_directories(
arcdps_uploader/includes
revtc
)
target_compile_definitions(d3d9_uploader PRIVATE
UNICODE
_UNICODE
_CRT_SECURE_NO_WARNINGS
CURL_STATICLIB
)
target_compile_options(d3d9_uploader PUBLIC "/Zc:__cplusplus")
add_executable(uploader_standalone
arcdps_uploader/main.cpp
arcdps_uploader/imgui/imgui_impl_dx9.cpp
arcdps_uploader/imgui/imgui_impl_dx9.h
arcdps_uploader/imgui/imgui_impl_win32.cpp
arcdps_uploader/imgui/imgui_impl_win32.h
${SOURCE}
${HEADERS}
)
set_property(TARGET uploader_standalone PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_compile_definitions(uploader_standalone PRIVATE
UNICODE
_UNICODE
_CRT_SECURE_NO_WARNINGS
CURL_STATICLIB
STANDALONE
)
target_compile_options(uploader_standalone PUBLIC "/Zc:__cplusplus")
set_property(TARGET uploader_standalone PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${GW2_DIR})
target_link_libraries(d3d9_uploader PUBLIC
CURL::libcurl
cpr::cpr
)
target_link_libraries(uploader_standalone PUBLIC
CURL::libcurl
cpr::cpr
D3d9
)
add_custom_command(TARGET d3d9_uploader POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:d3d9_uploader> ${GW2_DIR}/bin64/$<TARGET_FILE_NAME:d3d9_uploader>
)