forked from Legacy-LuaSTG-Engine/LuaSTG-Sub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
218 lines (200 loc) · 7.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# LuaSTG configurer
add_subdirectory(Shader)
include(Platform.cmake)
include(Core.cmake)
add_subdirectory(Configurer)
# LuaSTG Engine
add_executable(LuaSTG WIN32)
luastg_target_common_options(LuaSTG)
luastg_target_more_warning(LuaSTG)
target_precompile_headers(LuaSTG PRIVATE
LuaSTG/SharedHeaders.h
)
target_include_directories(LuaSTG PRIVATE
LuaSTG/Utility/fancylib
LuaSTG
LuaSTG/LuaBinding
)
target_compile_definitions(LuaSTG PRIVATE
LDEVVERSION
)
set(LUASTG_ENGINE_SOURCES
LuaSTG/SharedHeaders.h
LuaSTG/SharedHeaders.cpp
LuaSTG/Debugger/ImGuiExtension.cpp
LuaSTG/Debugger/ImGuiExtension.h
LuaSTG/Debugger/Logger.cpp
LuaSTG/Debugger/Logger.hpp
LuaSTG/GameObject/GameObject.cpp
LuaSTG/GameObject/GameObject.hpp
LuaSTG/GameObject/GameObjectBentLaser.cpp
LuaSTG/GameObject/GameObjectBentLaser.hpp
LuaSTG/GameObject/GameObjectClass.cpp
LuaSTG/GameObject/GameObjectClass.hpp
LuaSTG/GameObject/GameObjectPool.cpp
LuaSTG/GameObject/GameObjectPool.h
LuaSTG/GameResource/ResourceBase.hpp
LuaSTG/GameResource/ResourceTexture.hpp
LuaSTG/GameResource/ResourceSprite.hpp
LuaSTG/GameResource/ResourceAnimation.hpp
LuaSTG/GameResource/ResourceMusic.hpp
LuaSTG/GameResource/ResourceSoundEffect.hpp
LuaSTG/GameResource/ResourceParticle.hpp
LuaSTG/GameResource/ResourceFont.hpp
LuaSTG/GameResource/ResourcePostEffectShader.hpp
LuaSTG/GameResource/ResourceModel.hpp
LuaSTG/GameResource/ResourceModel.cpp
LuaSTG/GameResource/ResourceDebug.cpp
LuaSTG/GameResource/ResourceManager.cpp
LuaSTG/GameResource/ResourceManager.h
LuaSTG/GameResource/ResourcePassword.hpp
LuaSTG/GameResource/ResourcePool.cpp
LuaSTG/GameResource/Implement/ResourceBaseImpl.hpp
LuaSTG/GameResource/Implement/ResourceBaseImpl.cpp
LuaSTG/GameResource/Implement/ResourceTextureImpl.hpp
LuaSTG/GameResource/Implement/ResourceTextureImpl.cpp
LuaSTG/GameResource/Implement/ResourceSpriteImpl.hpp
LuaSTG/GameResource/Implement/ResourceSpriteImpl.cpp
LuaSTG/GameResource/Implement/ResourceAnimationImpl.hpp
LuaSTG/GameResource/Implement/ResourceAnimationImpl.cpp
LuaSTG/GameResource/Implement/ResourceMusicImpl.hpp
LuaSTG/GameResource/Implement/ResourceMusicImpl.cpp
LuaSTG/GameResource/Implement/ResourceSoundEffectImpl.hpp
LuaSTG/GameResource/Implement/ResourceSoundEffectImpl.cpp
LuaSTG/GameResource/Implement/ResourceParticleImpl.hpp
LuaSTG/GameResource/Implement/ResourceParticleImpl.cpp
LuaSTG/GameResource/Implement/ResourceFontImpl.hpp
LuaSTG/GameResource/Implement/ResourceFontImpl.cpp
LuaSTG/GameResource/Implement/ResourcePostEffectShaderImpl.hpp
LuaSTG/GameResource/Implement/ResourcePostEffectShaderImpl.cpp
LuaSTG/GameResource/Implement/ResourceModelImpl.hpp
LuaSTG/GameResource/Implement/ResourceModelImpl.cpp
LuaSTG/LuaBinding/lua_dwrite.hpp
LuaSTG/LuaBinding/lua_dwrite.cpp
LuaSTG/LuaBinding/lua_random.hpp
LuaSTG/LuaBinding/lua_random.cpp
LuaSTG/LuaBinding/lua_xinput.hpp
LuaSTG/LuaBinding/lua_xinput.cpp
LuaSTG/LuaBinding/LuaAppFrame.hpp
LuaSTG/LuaBinding/LuaCustomLoader.cpp
LuaSTG/LuaBinding/LuaCustomLoader.hpp
LuaSTG/LuaBinding/LuaInternalSource.cpp
LuaSTG/LuaBinding/LuaInternalSource.hpp
LuaSTG/LuaBinding/LuaWrapper.cpp
LuaSTG/LuaBinding/LuaWrapper.hpp
LuaSTG/LuaBinding/LuaWrapperMisc.hpp
LuaSTG/LuaBinding/LW_Archive.cpp
LuaSTG/LuaBinding/LW_Audio.cpp
LuaSTG/LuaBinding/LW_BentLaser.cpp
LuaSTG/LuaBinding/LW_Color.cpp
LuaSTG/LuaBinding/LW_DInput.cpp
LuaSTG/LuaBinding/LW_FileManager.cpp
LuaSTG/LuaBinding/LW_Input.cpp
LuaSTG/LuaBinding/LW_LuaSTG.cpp
LuaSTG/LuaBinding/LW_ParticleSystem.cpp
LuaSTG/LuaBinding/LW_Randomizer.cpp
LuaSTG/LuaBinding/LW_Render.cpp
LuaSTG/LuaBinding/LW_Renderer.cpp
LuaSTG/LuaBinding/LW_StopWatch.cpp
LuaSTG/LuaBinding/LW_ResourceMgr.cpp
LuaSTG/LuaBinding/LW_Platform.cpp
LuaSTG/LuaBinding/LW_GameObjectManager.cpp
LuaSTG/LuaBinding/LB_Mesh.cpp
LuaSTG/LuaBinding/PostEffectShader.hpp
LuaSTG/LuaBinding/PostEffectShader.cpp
LuaSTG/LuaBinding/Resource.hpp
LuaSTG/LuaBinding/Resource.cpp
LuaSTG/LuaBinding/Display.hpp
LuaSTG/LuaBinding/Display.cpp
LuaSTG/LuaBinding/Window.hpp
LuaSTG/LuaBinding/Window.cpp
LuaSTG/LuaBinding/SwapChain.hpp
LuaSTG/LuaBinding/SwapChain.cpp
LuaSTG/LuaBinding/HttpClient.hpp
LuaSTG/LuaBinding/HttpClient.cpp
LuaSTG/LuaBinding/generated/BlendModeX.cpp
LuaSTG/LuaBinding/generated/BlendModeX.hpp
LuaSTG/LuaBinding/generated/ColorMember.cpp
LuaSTG/LuaBinding/generated/ColorMember.hpp
LuaSTG/LuaBinding/generated/GameObjectMember.cpp
LuaSTG/LuaBinding/generated/GameObjectMember.hpp
LuaSTG/SteamAPI/SteamAPI.cpp
LuaSTG/SteamAPI/SteamAPI.hpp
LuaSTG/Utility/CircularQueue.hpp
LuaSTG/Utility/fixed_object_pool.hpp
LuaSTG/Utility/Utility.h
LuaSTG/Utility/ScopeObject.cpp
LuaSTG/Utility/xorshift.hpp
LuaSTG/AppFrame.h
LuaSTG/AppFrame.cpp
LuaSTG/AppFrameFontRenderer.cpp
LuaSTG/AppFrameDisplayMode.cpp
LuaSTG/AppFrameInput.cpp
LuaSTG/AppFrameLua.cpp
LuaSTG/AppFrameRender.cpp
LuaSTG/AppFrameRenderEx.cpp
LuaSTG/LConfig.h
LuaSTG/LMathConstant.hpp
LuaSTG/RuntimeCheck.hpp
LuaSTG/RuntimeCheck.cpp
LuaSTG/Main.h
LuaSTG/Main.cpp
LuaSTG/WindowsMain.cpp
LuaSTG/LuaSTG.manifest
)
source_group(TREE ${CMAKE_CURRENT_LIST_DIR} FILES ${LUASTG_ENGINE_SOURCES})
target_sources(LuaSTG PRIVATE
${LUASTG_ENGINE_SOURCES}
)
set(LUASTG_RESDIR ${CMAKE_CURRENT_LIST_DIR}/LuaSTG/Custom CACHE PATH "LuaSTG custom build configuration")
if(EXISTS ${LUASTG_RESDIR}/Custom.cmake)
message("LuaSTG will using custom build configuration: " ${LUASTG_RESDIR}/Custom.cmake)
include(${LUASTG_RESDIR}/Custom.cmake)
elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/${LUASTG_RESDIR}/Custom.cmake)
message("LuaSTG will using custom build configuration: " ${CMAKE_CURRENT_LIST_DIR}/${LUASTG_RESDIR}/Custom.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/${LUASTG_RESDIR}/Custom.cmake)
else()
message(FATAL_ERROR "LuaSTG can not find custom build configuration")
endif()
target_link_libraries(LuaSTG PRIVATE
spdlog
utility
utf8
PlatformAPI
DirectX::ToolKitMini
DirectX::TextureMini
Core
xmath
lua51_static
lua_plus
imgui
implot
lua_cjson
lua_filesystem
#lua_xlsx_csv
lua_imgui
imgui_impl_win32ex
imgui_impl_dx11
lua_steam_api
TracyAPI
pcg_cpp
pugixml
xxhash
LuaSTG.Sub.Configuration
)
if (LUASTG_LINK_YY_THUNKS)
target_link_libraries(LuaSTG PRIVATE YY_Thunks)
message(STATUS "[LuaSTG] Link: YY_Thunks")
endif ()
if (LUASTG_LINK_LUASOCKET)
target_compile_definitions(LuaSTG PRIVATE LUASTG_LINK_LUASOCKET)
target_link_libraries(LuaSTG PRIVATE luasocket)
message(STATUS "[LuaSTG] Link: luasocket")
endif ()
add_custom_command(TARGET LuaSTG POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:LuaSTG> ${CMAKE_BINARY_DIR}/bin/$<TARGET_FILE_NAME:LuaSTG>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Microsoft.XAudio2.Redist> ${CMAKE_BINARY_DIR}/bin/$<TARGET_FILE_NAME:Microsoft.XAudio2.Redist>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Microsoft.D3DCompiler.Redist> ${CMAKE_BINARY_DIR}/bin/$<TARGET_FILE_NAME:Microsoft.D3DCompiler.Redist>
VERBATIM
)