Skip to content

Commit

Permalink
CORE: Add LinkLibraries field to the project config file
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Jan 5, 2024
1 parent 432c730 commit 3a15f63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func buildProject() string {
c.AddLibrary("c")
}

for _, library := range project.Config.LinkLibraries {
c.AddLibrary(library)
}

output := filepath.Join(project.Path, "build", project.Config.Name)
err = c.Compile(output)

Expand Down
2 changes: 2 additions & 0 deletions core/workspace/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type Project struct {
type Config struct {
Name string
Src string

LinkLibraries []string
}

func NewProject(path string) (*Project, error) {
Expand Down

0 comments on commit 3a15f63

Please sign in to comment.