-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (33 loc) · 1.5 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
cmake_minimum_required(VERSION 3.21)
project(TemplatePlugin)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Release)
file(GLOB_RECURSE SRC_FILES_DIR
${PROJECT_SOURCE_DIR}/SDK/Header/*.cpp
${PROJECT_SOURCE_DIR}/SDK/Header/*.hpp
${PROJECT_SOURCE_DIR}/SDK/Header/*.h
${PROJECT_SOURCE_DIR}/Template/*.cpp
${PROJECT_SOURCE_DIR}/Template/*.hpp
${PROJECT_SOURCE_DIR}/Template/*.h
${PROJECT_SOURCE_DIR}/generator/*.h
${PROJECT_SOURCE_DIR}/generator/*.cpp
)
include_directories(SDK/Header)
include_directories(SDK/Header/third-party)
include_directories(Template)
link_directories(.)
add_definitions(-D"NDEBUG" -D"TEMPLATE_EXPORTS" -D"WIN32_LEAN_AND_MEAN" -D"_CRT_SECURE_NO_WARNINGS" -D"_WINDOWS"
-D"_USRDLL" -D"_AMD64_" -D"NOMINMAX" -D"_WINDLL" -D"_UNICODE" -D"UNICODE")
add_compile_options(
/permissive- /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /sdl /Zc:inline /fp:precise /errorReport:prompt /WX-
/Zc:forScope /Gd /Oi /MD /std:c++17 /FC /EHsc /nologo /diagnostics:column
)
add_link_options(
/MANIFEST /LTCG:incremental /NXCOMPAT /DEBUG /DLL /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
/MANIFESTUAC:NO /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /DELAYLOAD:"bedrock_server.dll" /TLBID:1
)
add_library(TemplatePlugin SHARED ${SRC_FILES_DIR})
add_custom_command(TARGET TemplatePlugin PRE_BUILD
COMMAND cmd /c ${PROJECT_SOURCE_DIR}/prepareLib.cmd ${PROJECT_SOURCE_DIR}
COMMENT "Preparing Library"
)