Skip to content

Commit

Permalink
a whole lotta stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Dec 14, 2023
1 parent fbeb9cf commit 364912e
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 152 deletions.
15 changes: 5 additions & 10 deletions premake/rythe/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function context.hasModule(module)
return hasFilter(_OPTIONS["modules"], module)
end

-- Project types are e.g. test, module, application, editor, static-libary, dynamic-library, header-only, util
-- Project types are e.g. test, module, application, editor, libary, header-only, util
function context.hasProjectType(projectType)
return hasFilter(_OPTIONS["types"], projectType)
end
Expand All @@ -43,23 +43,18 @@ function context.hasProjectGroup(projectGroup)
return hasFilter(_OPTIONS["groups"], projectGroup)
end

-- Links as shared library, but does no runtime reloading
-- Links as shared library
function context.linkShared()
return _OPTIONS["shared"] and not (_OPTIONS["dynamic"] or _OPTIONS["static"])
end

-- Enables runtime module loading, otherwise the same as shared
function context.linkDynamic()
return _OPTIONS["dynamic"] and not _OPTIONS["static"]
return _OPTIONS["shared"] and not _OPTIONS["static"]
end

-- If no link target is defined, then static is chosen
function context.linkStatic()
return _OPTIONS["static"] or not (context.linkShared() or context.linkDynamic())
return _OPTIONS["static"] or not context.linkShared()
end

function context.linkTarget()
return context.linkStatic() and "StaticLib" or "SharedLib"
return (context.linkStatic() and "StaticLib") or "SharedLib"
end

-- Tag to place at the end of a solution name
Expand Down
4 changes: 4 additions & 0 deletions premake/rythe/filesystem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ function fs.fileName(path)
return string.match(path, "([^/\\]+)$")
end

function fs.rootName(path)
return string.match(path, "^([^/\\]+)")
end

return fs
Loading

0 comments on commit 364912e

Please sign in to comment.