premake finally working, todo add sdl support to linux build
This commit is contained in:
95
premake5.lua
Normal file
95
premake5.lua
Normal file
@@ -0,0 +1,95 @@
|
||||
workspace "SakuraVNE"
|
||||
architecture "x64"
|
||||
startproject "SakuraEngine"
|
||||
|
||||
configurations{
|
||||
"Debug",
|
||||
"Release"
|
||||
}
|
||||
|
||||
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
||||
|
||||
IncludeDir = {}
|
||||
IncludeDir["ImGui"] = "/libs/imgui"
|
||||
|
||||
include "libs/imgui"
|
||||
|
||||
--engine project
|
||||
project "SakuraVNE" --project under solution
|
||||
location "SakuraVNE"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
cppdialect "C++20"
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" ..outputdir .. "/%{prj.name}")
|
||||
|
||||
files{
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp"
|
||||
}
|
||||
|
||||
includedirs{
|
||||
"%{prj.name}/src",
|
||||
"libs/spdlog/include",
|
||||
"libs/imgui",
|
||||
"libs/imgui/misc",
|
||||
"libs/imgui/backends"
|
||||
}
|
||||
|
||||
libdirs{
|
||||
"libs/imgui/bin/" .. outputdir .. "/ImGui"
|
||||
}
|
||||
links{ --reference
|
||||
"ImGui"
|
||||
}
|
||||
|
||||
links{
|
||||
"ImGui.lib"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
system "windows"
|
||||
cppdialect "C++20"
|
||||
staticruntime "off"
|
||||
runtime "Release"
|
||||
systemversion "latest"
|
||||
|
||||
defines{
|
||||
"PLATFORM_WINDOWS"
|
||||
}
|
||||
|
||||
includedirs{
|
||||
"libs/sdl/windows/include"
|
||||
}
|
||||
links {
|
||||
"SDL2",
|
||||
"SDL2main"
|
||||
}
|
||||
libdirs{
|
||||
"libs/sdl/windows/lib/x64/"
|
||||
}
|
||||
|
||||
postbuildcommands{
|
||||
("{COPY} ../libs/sdl/windows/lib/x64/SDL2.dll ../bin/" .. outputdir .. "/SakuraVNE")
|
||||
}
|
||||
|
||||
filter "system:linux"
|
||||
system "linux"
|
||||
cppdialect "C++20"
|
||||
staticruntime "off"
|
||||
runtime "Release"
|
||||
systemversion "latest"
|
||||
|
||||
defines{
|
||||
"PLATFORM_LINUX"
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines "DEBUG"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "RELEASE"
|
||||
optimize "On"
|
||||
symbols "off"
|
||||
Reference in New Issue
Block a user