Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MalekiRe opened this issue May 4, 2023 · 1 comment

Comments

@MalekiRe
Copy link

MalekiRe commented May 4, 2023

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
Copy link
Member

messense commented May 4, 2023

Because nobody needed them before, pull requests are welcome to add them here:

cargo-xwin/src/common.rs

Lines 420 to 435 in 48244fd

set(COMPILE_FLAGS
--target={target}
-Wno-unused-command-line-argument
-fuse-ld=lld-link
/imsvc{xwin_dir}/crt/include
/imsvc{xwin_dir}/sdk/include/ucrt
/imsvc{xwin_dir}/sdk/include/um
/imsvc{xwin_dir}/sdk/include/shared)
set(LINK_FLAGS
/manifest:no
-libpath:"{xwin_dir}/crt/lib/{xwin_arch}"
-libpath:"{xwin_dir}/sdk/lib/um/{xwin_arch}"
-libpath:"{xwin_dir}/sdk/lib/ucrt/{xwin_arch}")

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

No branches or pull requests

2 participants