microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.39k stars 1.14k forks source link

[0.76] Update the `cpp-lib` template project to support importing either paper Uwp or fabric Composition prop/targets #14024

Closed jonthysell closed 1 month ago

jonthysell commented 1 month ago

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

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

Microsoft Reviewers: Open in CodeFlow