-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
94 lines (78 loc) · 2.55 KB
/
CMakeLists.txt
File metadata and controls
94 lines (78 loc) · 2.55 KB
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
cmake_minimum_required(VERSION 3.15.0)
project(libER VERSION 0.2.0.0 LANGUAGES C CXX)
# Must build with C++20 or newer
set(CMAKE_CXX_STANDARD 20)
# Object library for libER[d].dll and libER_static[d].lib
add_library("objlibER" OBJECT)
# Set iterator debug level to 0 for ELDEN RING ABI compatibility
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
# Compile definitions:
target_compile_definitions("objlibER" PUBLIC LIBERAPI_EXPORT)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options("objlibER" PUBLIC
"-Wno-unused"
"-Wno-inconsistent-missing-override"
"-Wno-invalid-offsetof"
)
endif()
# Include directories:
target_include_directories("objlibER"
PUBLIC
"include"
"symbols"
)
# Confirm libER is compiled with MSVC or clang-cl
# with MSVC STL. Check the source file for more details
target_sources("objlibER" PUBLIC
"source/detail/compiler.cpp"
)
# Core source files
target_sources("objlibER" PUBLIC
"source/detail/app_version.cpp"
)
# Memory source files
target_sources("objlibER" PUBLIC
"source/memory/from_allocator.cpp"
"source/memory/from_delay_delete.cpp"
)
# Namespace DL source files
target_sources("objlibER" PUBLIC
"source/dantelion2/kernel_runtime.cpp"
"source/dantelion2/system.cpp"
"source/dantelion2/utility.cpp"
"source/dantelion2/fileio.cpp"
)
# Namespace FD4 source files
target_sources("objlibER" PUBLIC
"source/fd4/time.cpp"
"source/fd4/resource.cpp"
"source/fd4/detail/fd4_task.cpp"
)
# Namespace CS source files
target_sources("objlibER" PUBLIC
"source/coresystem/cs_param.cpp"
"source/coresystem/task.cpp"
"source/coresystem/file.cpp"
"source/coresystem/sound.cpp"
)
# Namespace GX source files
target_sources("objlibER" PUBLIC
"source/graphics/draw.cpp"
)
# Param manipulation source files
# target_sources("objlibER" PUBLIC
# "source/param/param.cpp"
# )
# Target libER[d].dll
add_library("libER" SHARED $<TARGET_OBJECTS:objlibER>)
target_include_directories("libER" PUBLIC "include" "symbols")
# Target libER_static[d].lib
add_library("libER_static" STATIC $<TARGET_OBJECTS:objlibER>)
target_include_directories("libER_static" PUBLIC "include" "symbols")
# Debug build "d" postfix in libERd.*
set_target_properties("libER" "libER_static" PROPERTIES DEBUG_POSTFIX d)
# No unused warnings with clang-cl
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options("libER" PUBLIC "-Wno-unused" "-Wno-inconsistent-missing-override")
target_compile_options("libER_static" PUBLIC "-Wno-unused" "-Wno-inconsistent-missing-override")
endif()