rust-cross / cargo-xwin

Cross compile Cargo project to Windows MSVC target with ease
Other
340 stars 30 forks source link

Certain directories aren't included that need to be to compile some packages. #48

Open MalekiRe opened 1 year ago

MalekiRe commented 1 year ago

I had to add these cxx and c flags in order to get cmake to compile my library, is this something that should be added directly to xwin or is there some reason why /include and /include/winrt and /include/winrt/wrl aren't a part of it?

cmake_config.cxxflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/cppwinrt");
cmake_config.cflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/cppwinrt");
cmake_config.cxxflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/winrt");
cmake_config.cflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/winrt");
cmake_config.cxxflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include");
cmake_config.cflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include");
cmake_config.cxxflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/winrt/wrl");
cmake_config.cflag("/imsvc/home/malek/.cache/cargo-xwin/xwin/sdk/include/winrt/wrl");

Thoughts? Recommendations? There is probably a better way to do this that I don't know about and I would prefer to do it that way.

messense commented 1 year ago

Because nobody needed them before, pull requests are welcome to add them here: https://github.com/rust-cross/cargo-xwin/blob/48244fd6a887273cc3dbebcf86a2516c777fdc85/src/common.rs#L420-L435