YoggieEngine/premake5.lua

88 lines
1.8 KiB
Lua

workspace "BarinkEngine"
configurations { "Debug", "Test", "Release" }
language "C++"
cppdialect "C++17"
targetdir "./build/%{prj.name}/%{cfg.buildcfg}"
objdir "./intermediates/%{prj.name}/%{cfg.buildcfg}"
architecture "x86_64"
project "SandboxApplication"
kind "ConsoleApp"
buildmessage "Building BarinkEngineSandbox ..."
includedirs {
"./libs/glad/include",
"./MyGraphicsEngine/include",
"./libs/spdlog/include",
"./libs/lua/include",
"./libs/glfw/include",
}
libdirs{
"./libs/spdlog/build/Release",
"./libs/glfw/build/src/Debug",
"./libs/lua"
}
links{
"liblua",
"spdlog",
"glfw3",
"MyGraphicsEngine"
}
files {
"SandboxApplication/*.cpp"
}
defines {"DEBUG"}
symbols "On"
-- NOTE: make these copy instructions more flexible
ok, err = os.copyfile("MyGraphicsEngine/shaders/fragment.shader", "build/SandboxApplication/Debug/test.fs")
if err then error("Copy fragment shader source failed!") end
ok, err = os.copyfile("MyGraphicsEngine/shaders/vertex.shader", "build/SandboxApplication/Debug/test.vs")
if err then error("Copy vertex shader source failed!") end
project "MyGraphicsEngine"
kind "StaticLib"
buildmessage "Building MyGraphicsEngine ..."
includedirs {
"./libs/glad/include",
"./libs/glfw/include",
"./libs/glew/include",
"./libs/spdlog/include",
"./libs/glm",
"./MyGraphicsEngine/include"
}
libdirs{
"./libs/spdlog/build/Release",
"./libs/glfw/build/src/Debug"
}
links {
"spdlog",
"glfw3"
}
files {
"./libs/glad/src/glad.c",
"MyGraphicsEngine/*.h",
"MyGraphicsEngine/*.cpp"
}
filter "configurations:Debug"
defines {"DEBUG"}
symbols "On"
filter "configurations:Release"
defines {"NDEBUG"}
optimize "On"