Skip to content

build: add CMake (Windows only)#3084

Open
asamy wants to merge 1 commit into
tpm2-software:masterfrom
asamy:cmake
Open

build: add CMake (Windows only)#3084
asamy wants to merge 1 commit into
tpm2-software:masterfrom
asamy:cmake

Conversation

@asamy

@asamy asamy commented May 6, 2026

Copy link
Copy Markdown

This allows out-of-tree building and some automation for external projects, specifically those that use it as a static library. Unfortunately the MSVC projects that are provided aren't flexible, specifically ConfigurationType and RuntimeLibrary aren't configurable via the command line due to the way they are specified, it was also difficult to configure other things such as toolset etc.

This is only limited to Windows. I am not setup for Linux/Mac.

@asamy
asamy force-pushed the cmake branch 2 times, most recently from e534be1 to 758dc96 Compare May 6, 2026 13:03
@AndreasFuchsTPM

Copy link
Copy Markdown
Member

I'd really like to see CI for this before merging.

@asamy
asamy force-pushed the cmake branch 2 times, most recently from 195a2dc to 1bbeb02 Compare May 12, 2026 16:00
@asamy

asamy commented May 12, 2026

Copy link
Copy Markdown
Author

Done.

I also recommend that you adjust repo settings to allow for NuGet package cache (vcpkgs) so that the build just fetches the prebuilt libs from there instead of rebuilding each time which usually takes some time. The NuGet fetch part is done in the CI file.

@asamy
asamy force-pushed the cmake branch 3 times, most recently from 03bb070 to bb3da1f Compare May 15, 2026 10:03
Signed-off-by: Ahmed Samy <asamy@protonmail.com>
@asamy

asamy commented Jul 10, 2026

Copy link
Copy Markdown
Author

Hi, is this being considered now that CI is in as requested? I would rather not maintain an own fork just for this small build thing.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants