I am trying to add a functionality to the chromium that requires the third party library tpm2-tss. This library has a makefile to build it.
I have added a folder tpm
in the third_party
directory and added a BUILD.gn
file. Also the library is added as a subdirectory in this folder.
thirdparty
...other third-party folders
tpm
BUILD.gn
tmp2-tss/
Makefile
...
I tried adding the library by using
config("tpm_config"){
include_dirs = ["tpm2-tss"]
}
in the BUILD.gn and then using configs += ["//thirdparty/tpm:tpm_config"]
where I want to use the library. This of course does not work as the tpm2-tss library is not header-only. However, I can't find a way to tell the GN Build system to build/link this library using the Makefile it provides.
Is there a way to use the makefile inside GN or do I need to rewrite the Makefile into a BUILD.gn?
This is just for a proof of concept so I don't need a proper solution that would satisfy the usual standards of the chromium repository.