Skip to content

Instantly share code, notes, and snippets.

@chromedays
Created June 1, 2020 03:20
Show Gist options
  • Save chromedays/61997c2ea6a9dd7496f6ba1c550f4947 to your computer and use it in GitHub Desktop.
Save chromedays/61997c2ea6a9dd7496f6ba1c550f4947 to your computer and use it in GitHub Desktop.
Premake file that generates a TF project
local workspace_name = "SampleWorkspace"
local project_name = "SampleProject"
workspace(workspace_name)
configurations {"DebugDx"}
project(project_name)
kind "WindowedApp"
language "C++"
targetdir "bin/%{cfg.architecture}/%{cfg.buildcfg}"
includedirs {"include"}
libdirs {"lib/%{cfg.architecture}/%{cfg.buildcfg}"}
links {"OS", "gainputstatic", "Xinput9_1_0", "ws2_32", "kernel32", "user32", "gdi32", "winspool", "comdlg32", "advapi32", "shell32", "ole32", "oleaut32", "uuid", "odbc32", "odbccp32"}
entrypoint "mainCRTStartup"
warnings "Default"
architecture "x86_64"
files {"src/**.h", "src/**.hpp", "src/**.c", "src/**.cpp"}
-- systemversion "10.0.17763.0"
systemversion "latest"
filter "configurations:DebugDx"
defines {"USE_MEMORY_TRACKING", "_DEBUG", "_WINDOWS", "DIRECT3D12"}
links {"RendererDX12"}
flags {"MultiProcessorCompile", "FatalCompileWarnings"}
nativewchar "On"
editAndContinue "On"
optimize "Off"
floatingpoint "Default"
runtime "Debug"
exceptionhandling "On"
postbuildcommands {
"(robocopy /s \"lib/%{cfg.architecture}/%{cfg.buildcfg}\" \"bin/%{cfg.architecture}/%{cfg.buildcfg}\" *.dll) ^& IF %ERRORLEVEL% LEQ 3 exit 0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment