microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.4k stars 6.47k forks source link

[osg] incorrect plugins install path #34244

Open Pospelove opened 1 year ago

Pospelove commented 1 year ago

Host: arm64-windows Target: x64-windows Steps to reproduce:

vcpkg install osg:x64-windows
cmake --build ... // building my project

Expected result:

Real result:

Screenshot:

image
Pospelove commented 1 year ago

${CMAKE_BINARY_DIR}/${cfg}/osgPlugins-3.6.5 should be created because OSG-based apps require that path to contain DLLs

At least OpenMW needs that

dg0yt commented 1 year ago

*/Release/* looks like a specific MSVC build-time pattern and shouldn't be hard-coded. Perhaps you can tell OpenMW where they are actually located? This is information which the osg CMake config already provides IIRC.

Pospelove commented 1 year ago

*/Release/* looks like a specific MSVC pattern and shouldn't be hard-coded. Perhaps you can tell OpenMW where they are actually located? This is information which the osg CMake config already provides IIRC.

those plugins are just shared libraries. I guess they should go to bin folder and they also should be copied into cmake binary dir while building a user project

dg0yt commented 1 year ago

Plugins are shared libraires, or DLLs, by nature. However, they are not meant to be linked directly, and they don't come with import libs on windows. That's why they are treated differently.

Pospelove commented 1 year ago

Plugins are shared libraires, or DLLs, by nature. However, they are not meant to be linked directly, and they don't come with import libs on windows. That's why they are treated differently.

I see. Do you confirm that installed/plugins is the correct place and will be kept the same?

or should/will they go to tools, share, etc

dg0yt commented 1 year ago

Do you confirm that installed/plugins is the correct place and will be kept the same?

AFAICT <prefix> plugins is the general place to collect plugins/modules. The implementation in port osg is intentional, based on past discussions, and I'm not aware of intentions to change it.

There is a documentation PR for the installation directory layout: https://github.com/microsoft/vcpkg-docs/pull/162 Disclaimer: The plugin mention was added on my request, and I'm only a contributor.

or should/will they go to tools, share, etc

For convenience, the port does deploy them to tools, too.

NB: There is a tradeoff between following upstream patterns closely and providing a fairly consistent behaviour across ports and platforms. And there is still a gap in vcpkg supporting deployment of plugins to consuming projects.

Pospelove commented 1 year ago

Thank you for your explanation! I'll consider closing this issue or rewriting it.

I wish to have plugins installed in the right way, but not sure if vcpkg has anything to do with that

github-actions[bot] commented 1 year ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

Pospelove commented 1 year ago

ааа

dg0yt commented 1 year ago

ааа

???