-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[0.76] Update the
cpp-lib
template project to support importing eit…
…her paper Uwp or fabric Composition prop/targets (#14024) This PR backports #13945 to 0.76. ## Description This PR creates new "entry" prop/target imports for C++ libraries that depend on the `UseFabric` property to conditionally import either the old Uwp props/targets or the new Composition props/targets. ### Type of Change - New feature (non-breaking change which adds functionality) ### Why This helps enable module projects to support both paper and fabric with the same build files. Resolves #13928. ### What Added new imports, updated the `cpp-lib` template and existing sample to load them. ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: yes Update the `cpp-lib` template project to support importing either paper Uwp or fabric Composition prop/targets
- Loading branch information
1 parent
3aa8532
commit 1154dfe
Showing
7 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@react-native-windows-cli-e586f288-c915-4e23-905d-df2ae20d6777.json
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,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "[0.76] Create hybrid CppLib props/targets", | ||
"packageName": "@react-native-windows/cli", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-10791c91-ee8b-489d-a0d2-a8047ec1cd70.json
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,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "[0.76] Create hybrid CppLib props/targets", | ||
"packageName": "react-native-windows", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
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
17 changes: 17 additions & 0 deletions
17
vnext/PropertySheets/External/Microsoft.ReactNative.CppLib.props
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT License. | ||
This file will be consumed by ALL C++ module projects (both inside | ||
and outside of this repo) that build on top of Microsoft.ReactNative. | ||
Do not make any changes here unless it applies to ALL such projects. | ||
--> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ImportGroup Condition="'$(UseFabric)' == 'true'"> | ||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Composition.CppLib.props" /> | ||
</ImportGroup> | ||
<ImportGroup Condition="'$(UseFabric)' != 'true'"> | ||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Uwp.CppLib.props" /> | ||
</ImportGroup> | ||
</Project> |
17 changes: 17 additions & 0 deletions
17
vnext/PropertySheets/External/Microsoft.ReactNative.CppLib.targets
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,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT License. | ||
This file will be consumed by ALL C++ module projects (both inside | ||
and outside of this repo) that build on top of Microsoft.ReactNative. | ||
Do not make any changes here unless it applies to ALL such projects. | ||
--> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ImportGroup Condition="'$(UseFabric)' == 'true'"> | ||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Composition.CppLib.targets" /> | ||
</ImportGroup> | ||
<ImportGroup Condition="'$(UseFabric)' != 'true'"> | ||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.ReactNative.Uwp.CppLib.targets" /> | ||
</ImportGroup> | ||
</Project> |
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