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

Is it possible to port this library to vcpkg? #67

Open
wangwenx190 opened this issue Jan 2, 2020 · 8 comments
Open

Is it possible to port this library to vcpkg? #67

wangwenx190 opened this issue Jan 2, 2020 · 8 comments

Comments

@wangwenx190
Copy link

vcpkg is a C++ library manager for Windows, Linux and macOS written by Microsoft. It supports CMake, meson and many other build systems.

@haasn
Copy link
Owner

haasn commented Jan 4, 2020

Seems reasonable, but I don't know anything about vcpkg and I don't intend to research this. If you want to contribute a package (for any platform), I'd be happy to ACK or link to it.

@wangwenx190
Copy link
Author

I'm trying to port this library to Windows, but I found that your meson scripts do not take Windows platform into account. You are using Linux-specific parameters. I'm not familiar with meson so could you please adjust your meson scripts to make them portable to Windows? GNU FriBidi is a good example, it also uses meson and can be ported to Windows easily.

Using MinGW is impossible because vcpkg doesn't support it. It uses MSVC on Windows.

@wangwenx190
Copy link
Author

Maybe GCC only flags -> MSVC compatible flags. I don't know how fribidi does it, but it can be compiled by MSVC on Windows.

@haasn
Copy link
Owner

haasn commented Jan 4, 2020

Does clang work with vcpkg?

That aside, I could see if compilation with MSVC can be made possible, but my hopes are not high. (We use e.g. preprocessor features that are only supported by GCC/clang afaict). MSVC support has never been in scope for libplacebo, mostly due to lack of interest.

In any case, I'd need some sort of compilation log or list of errors, so I can know which of the options are even causing problems.

@wangwenx190
Copy link
Author

For now, the most critical problem is meson can't find vulkan and shaderc although I have already installed them. I'm trying to find out why. I'll show you the compilation log once I got it.

However, it may take some time because I don't have much free time in my real life. Sorry for it.

@feliwir
Copy link

feliwir commented Mar 16, 2020

I'm interested in this aswell. @wangwenx190 is there anything how i could help you with this?

mypopydev pushed a commit to mypopydev/libplacebo that referenced this issue Apr 12, 2020
In some configurations (perhaps related to linker settings), glslang
seems to depend on SPIRV-Tools, and failing to explicitly load this
dependency causes link issues.

Fix this by simply adding the dependencies to the dependency list.
(Seriously, can glslang get a .pc file already?)

Fixes haasn#67
mypopydev pushed a commit to mypopydev/libplacebo that referenced this issue Apr 12, 2020
This fixes the CI/licensing issues introduced by 6837566 without
regressing haasn#67. We will now link against SPIRV-Tools where we can, and
won't otherwise. Apparently glslang can sometimes depend on SPIRV-Tools
and sometimes not...

A better solution for this might still be needed to avoid licensing
issues. But for now, I don't particularly care, especially since we
don't actually use any code from SPIRV-Tools so in theory the license
shouldn't matter.
@Lypheo
Copy link

Lypheo commented May 9, 2020

For now, the most critical problem is meson can't find vulkan and shaderc although I have already installed them. I'm trying to find out why. I'll show you the compilation log once I got it.

However, it may take some time because I don't have much free time in my real life. Sorry for it.

The only way I could get meson to find shaderc on windows was by hardcoding its location here like this:

    shaderc = cc.find_library(n, required: get_option('shaderc'), dirs: '<location of shaderc_shared.lib>')

This is probably extremely dumb, but hey, it compiles. ¯\_(ツ)_/¯
As for Vulkan, make sure you have an environment variable VULKAN_SDK set to the installation directory.

Edit: Alternatively you can manually add shaderc_shared.lib to your build environment’s lib directory, e.g. *tdm-gcc\lib for tdm gcc.

@ghost
Copy link

ghost commented Apr 22, 2022

You can add the shaderc lib path to the user or computer LIB (setx LIB %LIB%;C:\Path\To\ShaderRC\lib from a regular command prompt without all the MSVS paths in place to make it stick without polluting future VS dev prompts) and the visual studio command prompts will preserve them at the end of their own lists... Then meson should be able to find them with just find_library, assuming it works roughly like CMake, although at that point you really only need the lib name for either CL / LINK or clang-cl.

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

4 participants