xmake icon indicating copy to clipboard operation
xmake copied to clipboard

Add a add_assets to the vs generator

Open TNtube opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe.

I faced a problem with the current vs solution generator, I couldn't see my assets folder (contening mainly images and glsl scripts)

Describe the solution you'd like

A add_assets function (or any name that sound better) to add any non project files in the VS solution hierarchy.

Describe alternatives you've considered

I'm currently using add_headerfiles, that is working in my case but feel more like a hack than anything.

Thanks you

Additional context

No response

TNtube avatar May 26 '22 12:05 TNtube

Maybe we could reuse add_installfiles to include them in VS projects?

SirLynix avatar May 26 '22 12:05 SirLynix

try add_headerfiles("xxx.glsl")?

waruqi avatar May 26 '22 16:05 waruqi

That's currently what i'm doing and it works well, but I thought it was more a hack than a solution.

TNtube avatar May 26 '22 16:05 TNtube

meson has "extra_files" to list them

Arthapz avatar May 31 '22 16:05 Arthapz

meson is just a project generator, so it can provide various special interfaces related to the project generator.

But project generator is only an optional plug-in for xmake, and I don't want to add a special api just for the features that project generator needs.

waruqi avatar May 31 '22 16:05 waruqi

May be we can add add_extrafiles for extra files. It will be used to support some of the following features.

  1. Only show them in vs/vsxmake project generator, but they will be not installed.
  2. ...

Only one case I can think of at the moment, but it's not enough to add an new api just for the vs project generator.

waruqi avatar Apr 10 '23 04:04 waruqi

I have added it. add_extrafiles("*.txt") https://github.com/xmake-io/xmake/pull/4104

xmake update -s dev

waruqi avatar Aug 21 '23 08:08 waruqi

Awesome, thank you!

SirLynix avatar Aug 21 '23 14:08 SirLynix