SHADE_Y3/SHADE_Engine/premake5.lua

163 lines
4.1 KiB
Lua
Raw Normal View History

2022-08-26 14:04:03 +08:00
project "SHADE_Engine"
2022-09-12 13:26:25 +08:00
kind "SharedLib"
2022-08-26 14:04:03 +08:00
language "C++"
cppdialect "C++20"
targetdir (outputdir)
objdir (interdir)
2022-08-26 14:04:03 +08:00
systemversion "latest"
pchheader "SHpch.h"
pchsource "%{prj.location}/src/SHpch.cpp"
staticruntime "off"
2022-08-26 14:04:03 +08:00
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.hpp",
2022-08-26 14:04:03 +08:00
"%{prj.location}/src/**.c",
"%{prj.location}/src/**.cpp",
"%{prj.location}/src/**.glsl",
"%{prj.location}/**.natvis"
2022-08-26 14:04:03 +08:00
}
includedirs
{
"%{prj.location}/src",
}
externalincludedirs
{
"%{IncludeDir.assimp}\\include",
2022-08-26 14:30:41 +08:00
"%{IncludeDir.imgui}",
"%{IncludeDir.imguizmo}",
"%{IncludeDir.imnodes}",
"%{IncludeDir.msdf_atlas_gen}",
"%{IncludeDir.msdfgen}",
"%{IncludeDir.spdlog}\\include",
2022-08-26 14:30:41 +08:00
"%{IncludeDir.tracy}",
"%{IncludeDir.VMA}\\include",
2022-08-26 14:30:41 +08:00
"%{IncludeDir.yamlcpp}",
"%{IncludeDir.SDL}\\include",
"%{IncludeDir.RTTR}\\include",
"%{IncludeDir.reactphysics3d}\\include",
"%{IncludeDir.VULKAN}\\include",
"%{IncludeDir.VULKAN}\\Source\\SPIRV-Reflect",
"%{IncludeDir.dotnet}\\include",
"%{IncludeDir.tinyddsloader}",
"%{IncludeDir.fmod}\\include"
2022-08-26 14:04:03 +08:00
}
externalwarnings "Off"
2022-08-26 14:04:03 +08:00
libdirs
{
2022-09-06 10:39:12 +08:00
"%{prj.location}/libs",
"%{IncludeDir.VULKAN}/Lib",
"%{IncludeDir.assimp}/lib/Debug",
"%{IncludeDir.assimp}/lib/Release",
"%{IncludeDir.RTTR}/lib",
2022-09-14 21:47:39 +08:00
"%{IncludeDir.SDL}/lib",
"%{IncludeDir.spdlog}/lib",
"%{IncludeDir.fmod}/lib",
2022-08-26 14:04:03 +08:00
}
links
{
2022-09-06 10:39:12 +08:00
"yaml-cpp",
2022-08-26 14:30:41 +08:00
"msdfgen",
2022-09-06 10:39:12 +08:00
"msdf-atlas-gen",
"reactphysics3d",
"imgui",
2022-09-12 13:26:25 +08:00
"vulkan-1.lib",
2022-09-14 21:47:39 +08:00
"SDL2.lib",
"SDL2main.lib",
"shaderc_shared.lib",
"shlwapi.lib"
2022-08-26 14:04:03 +08:00
}
2022-09-15 11:33:40 +08:00
disablewarnings
{
"4251"
2022-08-26 14:04:03 +08:00
}
defines
{
"_LIB",
"_GLFW_INCLUDE_NONE",
2022-09-08 19:11:25 +08:00
"MSDFGEN_USE_CPP11",
"NOMINMAX",
"SH_API_EXPORT"
2022-08-26 14:04:03 +08:00
}
flags
{
"MultiProcessorCompile"
}
2022-09-05 15:29:02 +08:00
dependson
{
2022-09-06 10:39:12 +08:00
"yaml-cpp",
"msdfgen",
"msdf-atlas-gen",
"reactphysics3d",
"imgui",
2022-09-05 15:29:02 +08:00
}
2022-09-12 13:26:25 +08:00
postbuildcommands
{
"xcopy /s /r /y /q \"%{IncludeDir.spdlog}\\bin\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.SDL}\\lib\\SDL2.dll\" \"$(OutDir)\"",
"xcopy /s /r /y /q \"%{IncludeDir.dotnet}\\bin\" \"$(OutDir)\""
2022-09-05 15:29:02 +08:00
}
filter "configurations:Debug"
postbuildcommands
{
"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Debug\\assimp-vc142-mtd.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmodL.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmodstudioL.dll\" \"$(OutDir)\""
}
filter "configurations:Release"
postbuildcommands
{
"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmod.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmodstudio.dll\" \"$(OutDir)\""
}
2022-09-28 17:22:22 +08:00
filter "configurations:Publish"
postbuildcommands
{
"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmod.dll\" \"$(OutDir)\"",
"xcopy /r /y /q \"%{IncludeDir.fmod}\\lib\\fmodstudio.dll\" \"$(OutDir)\""
}
2022-09-28 20:33:29 +08:00
filter "configurations:Publish"
postbuildcommands {"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\""}
2022-08-26 14:04:03 +08:00
warnings 'Extra'
filter "configurations:Debug"
symbols "On"
2022-09-25 22:33:07 +08:00
defines {"_DEBUG", "SHEDITOR"}
links{"assimp-vc142-mtd.lib", "librttr_core_d.lib", "spdlogd.lib"}
links{"fmodstudioL_vc.lib", "fmodL_vc.lib"}
2022-08-26 14:04:03 +08:00
filter "configurations:Release"
2022-09-25 22:33:07 +08:00
optimize "On"
defines{"_RELEASE", "SHEDITOR"}
links{"assimp-vc142-mt.lib", "librttr_core.lib", "spdlog.lib"}
links{"fmodstudio_vc.lib", "fmod_vc.lib"}
2022-09-25 22:33:07 +08:00
filter "configurations:Publish"
2022-08-26 14:04:03 +08:00
optimize "On"
2022-09-28 17:22:22 +08:00
defines{"_RELEASE", "_PUBLISH"}
links{"assimp-vc142-mt.lib", "librttr_core.lib", "spdlog.lib"}
2022-09-25 22:33:07 +08:00
excludes
{
"%{prj.location}/src/Editor/**.cpp",
"%{prj.location}/src/Editor/**.h",
"%{prj.location}/src/Editor/**.hpp",
}
links{"fmodstudio_vc.lib", "fmod_vc.lib"}