-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
57 lines (46 loc) · 1.14 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
cmake_minimum_required(VERSION 3.20)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
project(gotobed VERSION 2.1.0.0)
find_package(CommonLibSSE REQUIRED)
find_package(Detours REQUIRED)
find_package(nlohmann_json REQUIRED)
configure_file(cmake/plugin.h.in plugin.h)
configure_file(cmake/version.rc.in version.rc)
add_library("${PROJECT_NAME}" SHARED)
target_sources("${PROJECT_NAME}"
PRIVATE
src/init.cpp
src/init.h
src/main.cpp
src/MenuOpenHandler.cpp
src/MenuOpenHandler.h
src/Offsets.h
src/pch.h
src/Settings.cpp
src/Settings.h
src/SettingsPapyrus.cpp
src/SettingsPapyrus.h
src/TESObjectREFR.cpp
src/TESObjectREFR.h
"${PROJECT_BINARY_DIR}/plugin.h"
"${PROJECT_BINARY_DIR}/version.rc"
)
target_precompile_headers("${PROJECT_NAME}"
PRIVATE
src/pch.h
)
target_compile_features("${PROJECT_NAME}"
PRIVATE
cxx_std_20
)
target_include_directories("${PROJECT_NAME}"
PRIVATE
"${PROJECT_BINARY_DIR}"
)
target_link_libraries("${PROJECT_NAME}"
PRIVATE
CommonLibSSE::CommonLibSSE
Detours::Detours
nlohmann_json::nlohmann_json
)
install(TARGETS "${PROJECT_NAME}" RUNTIME DESTINATION "${SKYRIM_ROOT}/data/skse/plugins")