SHADE_Y3/SHADE_Engine/premake5.lua

145 lines
3.4 KiB
Lua

project "SHADE_Engine"
kind "SharedLib"
language "C++"
cppdialect "C++20"
targetdir (outputdir)
objdir (interdir)
systemversion "latest"
pchheader "SHpch.h"
pchsource "%{prj.location}/src/SHpch.cpp"
staticruntime "off"
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.hpp",
"%{prj.location}/src/**.c",
"%{prj.location}/src/**.cpp",
"%{prj.location}/src/**.glsl",
"%{prj.location}/**.natvis"
}
includedirs
{
"%{prj.location}/src",
}
externalincludedirs
{
"%{IncludeDir.assimp}\\include",
"%{IncludeDir.imgui}",
"%{IncludeDir.imguizmo}",
"%{IncludeDir.imnodes}",
"%{IncludeDir.msdf_atlas_gen}",
"%{IncludeDir.msdfgen}",
"%{IncludeDir.spdlog}\\include",
"%{IncludeDir.tracy}",
"%{IncludeDir.VMA}\\include",
"%{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"
}
externalwarnings "Off"
libdirs
{
"%{prj.location}/libs",
"%{IncludeDir.VULKAN}/Lib",
"%{IncludeDir.assimp}/lib/Debug",
"%{IncludeDir.assimp}/lib/Release",
"%{IncludeDir.RTTR}/lib",
"%{IncludeDir.SDL}/lib",
"%{IncludeDir.spdlog}/lib",
"%{IncludeDir.fmod}/lib",
}
links
{
"yaml-cpp",
"msdfgen",
"msdf-atlas-gen",
"reactphysics3d",
"imgui",
"vulkan-1.lib",
"SDL2.lib",
"SDL2main.lib",
"shaderc_shared.lib",
"shlwapi.lib"
}
disablewarnings
{
"4251"
}
defines
{
"_LIB",
"_GLFW_INCLUDE_NONE",
"MSDFGEN_USE_CPP11",
"NOMINMAX",
"SH_API_EXPORT"
}
flags
{
"MultiProcessorCompile"
}
dependson
{
"yaml-cpp",
"msdfgen",
"msdf-atlas-gen",
"reactphysics3d",
"imgui",
}
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)\""
}
filter "configurations:Debug"
postbuildcommands {"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Debug\\assimp-vc142-mtd.dll\" \"$(OutDir)\""}
filter "configurations:Release"
postbuildcommands {"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\""}
filter "configurations:Publish"
postbuildcommands {"xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\""}
warnings 'Extra'
filter "configurations:Debug"
symbols "On"
defines {"_DEBUG", "SHEDITOR"}
links{"assimp-vc142-mtd.lib", "librttr_core_d.lib", "spdlogd.lib"}
links{"fmodstudioL_vc.lib", "fmodL_vc.lib"}
filter "configurations:Release"
optimize "On"
defines{"_RELEASE", "SHEDITOR"}
links{"assimp-vc142-mt.lib", "librttr_core.lib", "spdlog.lib"}
--links{"fmodstudio_vc.lib", "fmod_vc.lib"}
filter "configurations:Publish"
optimize "On"
defines{"_RELEASE", "_PUBLISH"}
links{"assimp-vc142-mt.lib", "librttr_core.lib", "spdlog.lib"}
excludes
{
"%{prj.location}/src/Editor/**.cpp",
"%{prj.location}/src/Editor/**.h",
"%{prj.location}/src/Editor/**.hpp",
}
links{"fmodstudio_vc.lib", "fmod_vc.lib"}