-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
68 lines (54 loc) · 2.48 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
cmake_minimum_required(VERSION 3.28)
project(Nameplate
VERSION 0.51
LANGUAGES CXX
DESCRIPTION "Corrects defects in nameplate rendering."
HOMEPAGE_URL "https://www.github.com/Shirk/Nameplate"
)
# set(ASHITA_SDK_PATH "../Ashita v4 SDK 4.11/plugins/sdk" CACHE STRING "Ashita SDK Path")
# set(ASHITA_SDK_PATH "../Ashita v4 SDK 4.14/plugins/sdk" CACHE STRING "Ashita SDK Path")
# set(ASHITA_SDK_PATH "../Ashita v4 SDK 4.15/plugins/sdk" CACHE STRING "Ashita SDK Path")
set(ASHITA_SDK_PATH "../Ashita v4 SDK 4.16/plugins/sdk" CACHE STRING "Ashita SDK Path")
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED True)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS True)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/versioninfo.rc.in versioninfo.rc @ONLY)
add_library(Nameplate SHARED)
target_sources(Nameplate PUBLIC
src/Nameplate.cpp
src/Nameplate.h
src/Ashita/Ashita.cpp
src/Ashita/exports.h
src/Windozer/Windozer.cpp
src/Windozer/Windozer.h
src/exports.def
"${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc"
PUBLIC FILE_SET CXX_MODULES FILES
src/findsignature.cppm
)
target_include_directories(Nameplate PRIVATE ${ASHITA_SDK_PATH})
target_compile_definitions(Nameplate PRIVATE WIN32_LEAN_AND_MEAN)
set_property(TARGET Nameplate PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
if(MSVC)
target_compile_options(Nameplate PRIVATE /EHa /W4)
else()
target_compile_options(Nameplate PRIVATE
-m32
-fno-rtti -march=nehalem -fomit-frame-pointer -ffast-math -mfpmath=sse -mtune=skylake
-Wall -Wextra -Wpedantic -W
-Wno-c++98-compat -Wno-reserved-macro-identifier -Wno-nonportable-system-include-path
-Wno-reserved-identifier -Wno-gnu-anonymous-struct -Wno-nested-anon-types
-Wno-c++98-compat-pedantic -Wno-non-virtual-dtor -Wno-extra-semi -Wno-shadow-field
-Wno-old-style-cast -Wno-float-equal -Wno-documentation -Wno-microsoft-end-of-file
-Wno-sign-conversion -Wno-cast-align
-Wno-newline-eof -Wno-language-extension-token -Wno-cast-qual -Wno-extra-semi-stmt
-Wno-deprecated-copy-with-user-provided-dtor -Wno-missing-noreturn
-Wno-tautological-unsigned-zero-compare -Wno-duplicate-enum -Wno-double-promotion
-Wno-documentation-unknown-command -Wno-unused-function
-Wno-c99-extensions -Wno-missing-braces)
target_link_options(Nameplate PRIVATE -m32)
endif()