libplacebo icon indicating copy to clipboard operation
libplacebo copied to clipboard

Is it possible to port this library to vcpkg?

Open wangwenx190 opened this issue 5 years ago • 11 comments

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

wangwenx190 avatar Jan 02 '20 12:01 wangwenx190

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.

haasn avatar Jan 04 '20 10:01 haasn

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 avatar Jan 04 '20 11:01 wangwenx190

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

wangwenx190 avatar Jan 04 '20 11:01 wangwenx190

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.

haasn avatar Jan 04 '20 12:01 haasn

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.

wangwenx190 avatar Jan 04 '20 12:01 wangwenx190

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

feliwir avatar Mar 16 '20 12:03 feliwir

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.

Lypheo avatar May 09 '20 09:05 Lypheo

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.

ghost avatar Apr 22 '22 17:04 ghost