Created
March 17, 2020 12:40
-
-
Save ifree/d41137184b93f18ff3eba0acb825a3b2 to your computer and use it in GitHub Desktop.
skeleton premake5 config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workspace "CPP_Playground" | |
configurations {"Debug", "Release", "DebugDLL", "ReleaseDLL"} | |
platforms {"x64"} | |
-- basedir (path.getabsolute(_PREMAKE_DIR .. "../")) | |
location "../build" | |
targetdir "../build/bin/%{cfg.longname}" | |
debugdir "../build/bin/%{cfg.longname}" | |
configuration {"Debug"} | |
defines { "DEBUG" } | |
symbols "On" | |
configuration {"Release"} | |
defines { "NDEBUG" } | |
optimize "On" | |
filter "system:Windows" | |
systemversion "latest" | |
function library_config() | |
kind "StaticLib" | |
configuration {"Debug"} | |
targetsuffix "_d" | |
configuration {"Release"} | |
targetsuffix "_r" | |
filter "*DLL" | |
kind "SharedLib" | |
filter {} | |
end | |
function app_config(name) | |
kind "ConsoleApp" | |
language "C++" | |
files {"../src/" .. name .. "/**.h", "../src/" .. name .. "/**.cpp"} | |
links {} | |
includedirs {"../third_party/", "../src/" .. name} | |
vpaths { | |
["source/*"] = {"../src/" .. name .. "/**.cpp"}, | |
["include/*"] = {"../src/" .. name .. "/**.h", "../src/" .. name .. "/**.hpp"} | |
} | |
end | |
group "external" | |
project "__premake__" | |
kind "Utility" | |
files {"../scripts/**"} | |
configuration "*" | |
filter "files:premake5.lua" | |
buildcommands { "premake5 --file=%{wks.location}../scripts/premake5.lua vs2019" } | |
buildinputs { "%{wks.location}/../scripts/premake5.lua" } | |
buildoutputs { "%{cfg.objdir}/build.timestamp" } --missing output make it as phony target | |
include "../third_party/imgui-1.72b" | |
group "apps" | |
project "helloworld" | |
app_config("helloworld") | |
project "allocation" | |
app_config("allocation") | |
project "demoscene" | |
app_config("demoscene") | |
kind "WindowedApp" | |
links {"winmm"} | |
project "graph_playground" | |
app_config("graph") | |
links {"imgui", "imgui_impl"} | |
includedirs {"../third_party/imgui-1.72b"} | |
includedirs {"../third_party/imgui-1.72b/examples"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment