SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

Override reference inclusion by targets file

Open bpiepiora opened this issue 6 years ago • 2 comments

Hi again,

the target file ../packages/SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12/build/net35/SQLitePCLRaw.lib.e_sqlite3.linux.targets automatically includes the libe_sqlite3.so file into my project. AFAIK this forces me to create a new (sub-)project for each CPU architecture I want to address (x86, x64, arm). Since my project is for Mono it is possible to configure the library for each CPU arch in a config file. In this case the config files name is SQLitePCLRaw.provider.e_sqlite3.dll.config.

Would it be possible to add an additional check to the targets files which prevents the reference inclusion? Something like: <ItemGroup Condition=" '$(OS)' == 'Unix' AND !Exists('/Library/Frameworks') AND !Exists('SQLitePCLRaw.provider.e_sqlite3.dll.config')">

Or is there a better/an easier way to achieve that?

bpiepiora avatar Jan 28 '19 10:01 bpiepiora

Hmmm. Yeah, that targets file doesn't look good for the mono case.

I SO wish mono could do CPU arch the way .NET Core does. :-)

Can you give me more detail about your proposed solution?

ericsink avatar Jan 28 '19 18:01 ericsink

Hi, I created a small example where you can see the implementation: https://github.com/bpiepiora/SqlitePclRawMono

And I really have to look up how .NET Core handles different CPU archs.

bpiepiora avatar Jan 30 '19 09:01 bpiepiora

Closing old/stale issue.

ericsink avatar Sep 22 '22 21:09 ericsink