Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dofileopt { "premake5-system.lua", "premake-system.lua" }
- filter {}
- local GBUILD_LOCATION = path.getdirectory( _SCRIPT )
- -- Hack to allow multiple gmodule calls
- local targetSuffixes = {
- ["windows"] = "_win32",
- ["macosx"] = "_osx",
- ["linux"] = "_linux"
- }
- function gmodule( moduleName )
- --
- -- Super hacky way to allow gmodule to define its own solution
- --
- if not pcall( solution ) then
- solution ( moduleName )
- architecture "x86"
- language "C++"
- location "project"
- targetdir "bin"
- flags "StaticRuntime"
- configurations { "Debug", "Release" }
- configuration "Debug"
- flags "symbols"
- configuration "Release"
- optimize "On"
- end
- project ( moduleName )
- kind "SharedLib"
- local prefix = moduleName:match( "[^_]*" )
- if prefix ~= "gm" and prefix ~= "gmsv" and prefix ~= "gmcl" then
- targetprefix "gm_"
- end
- local suffix = moduleName:match( "[^_]*$" )
- if suffix ~= "win32" and suffix ~= "osx" and suffix ~= "linux" then
- targetsuffix ( targetSuffixes[os.get()] or "_WHATHAVEYOUDONE" )
- end
- targetextension ".dll"
- end
- function ginclude( dependencyName )
- dofile( path.join( GBUILD_LOCATION, "deps", dependencyName, "premake5.lua" ) )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement