-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mcallet/fix-makefile-export' into 'main'
fix: check [Export] flag on makefile generation to avoid LDDEPS declaration See merge request Sharpmake/sharpmake!482
- Loading branch information
Showing
4 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
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
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
34 changes: 34 additions & 0 deletions
34
samples/HelloLinux/codebase/external_lib/external_lib.sharpmake.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Ubisoft. All Rights Reserved. | ||
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information. | ||
|
||
using System.IO; | ||
using System; | ||
using Sharpmake; | ||
using System.Linq; | ||
|
||
namespace HelloLinux | ||
{ | ||
[Export] | ||
//This export keyword will: | ||
// 1 - Prevent the generation of a dedicated makefile for this project | ||
// 2 - Prevent the inclusion of this project into the LDDEPS list of your makefile | ||
// In this example only the configured projectName will be added into the LDLIBS flag in the generated makefile. | ||
public class ExternalLibProject : CommonProject | ||
{ | ||
public ExternalLibProject() | ||
{ | ||
AddTargets(CommonTarget.GetDefaultTargets()); | ||
|
||
//We name this project voluntarly curl in order to link to a library already existing in this OS. | ||
Name = "curl"; | ||
} | ||
|
||
public override void ConfigureAll(Configuration conf, CommonTarget target) | ||
{ | ||
base.ConfigureAll(conf, target); | ||
|
||
//We use the static library format because it's the one already existing inside the OS. | ||
conf.Output = Configuration.OutputType.Lib; | ||
} | ||
} | ||
} |
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