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

Pango package does not have a .cmake file to find via find_package #17225

Closed
NicolBolas opened this issue Apr 12, 2021 · 3 comments
Closed

Pango package does not have a .cmake file to find via find_package #17225

NicolBolas opened this issue Apr 12, 2021 · 3 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@NicolBolas
Copy link

Describe the bug
The Pango package can be built and installed just fine. But it has no pango-config.cmake package file. As such, find_package cannot include it. And pursuant to issue #6045, an installed package should be accessible via find_package.

Environment

  • OS: Windows 10
  • Compiler: Visual Studio 2019 CE Version 16.9.3

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install pango
  2. Use find_package(pango CONFIG REQUIRED)
  3. See Error.

Expected behavior
The package should be included.

Failure logs

1> [CMake] CMake Error at C:/Projects/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package):
1> [CMake]   Could not find a package configuration file provided by "pango" with any of
1> [CMake]   the following names:
1> [CMake] 
1> [CMake]     pangoConfig.cmake
1> [CMake]     pango-config.cmake
1> [CMake] 
1> [CMake]   Add the installation prefix of "pango" to CMAKE_PREFIX_PATH or set
1> [CMake]   "pango_DIR" to a directory containing one of the above files.  If "pango"
1> [CMake]   provides a separate development package or SDK, be sure it has been
1> [CMake]   installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake]   cairo_vcpkg/CMakeLists.txt:8 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
@JonLiu1993 JonLiu1993 self-assigned this Apr 12, 2021
@JackBoosY JackBoosY added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Apr 12, 2021
@Neumann-A
Copy link
Contributor

pango is normally a meson based port and does not provide cmake configs. You need to write your own FindPango.cmake since vcpkg does not provide those by default. (or use #13100 + pkgconfig)

So the issue here is really pango does not provide a pc file.

@NicolBolas
Copy link
Author

I'm still pretty new to vcpkg, so I don't really understand the division of who is responsible for what here. So maybe I'm asking in the wrong place. But my understanding is that, if vcpkg provides a package that can be installed, then CMake's find_package ought to be able to find it and bring it into the CMake build.

Is it not vcpkg's responsibility to make that happen when it exposes a package for installation? Or are those CMake target package files supposed to be supplied by the library being exposed by vcpkg?

@Neumann-A
Copy link
Contributor

Nope that is upstream responsibility. Either they provide cmake configs or they don't. Same goes for pc files but those a quite common. vcpkg only makes sure if upstream provides them that they are correct within the context of vcpkg.

vcpkg does not provide configs or Find since this would make your buildscript directly depend on whatever vcpkg defines which means you are locked in and unable to switch to another pkg management solution (conan/system or whatever comes in the future).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

4 participants