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

[pkgconfig] cotire doesn't fully support cmake function FindPkgConfig #186

Open
JackBoosY opened this issue May 24, 2022 · 1 comment
Open

Comments

@JackBoosY
Copy link

JackBoosY commented May 24, 2022

When using pkg_check_modules, CMAKE_MINIMUM_REQUIRED_VERSION must be set greater than or equal to 3.1 to allow cmake to automatically add CMAKE_PREFIX_PATH to PKG_CONFIG_PATH so that pkg-config can be called to find .pc files.
However, the minimum cmake version requirement for cotire is 2.8.12, which will cause this setting to fail.

See code:
https://github.com/Kitware/CMake/blob/master/Modules/FindPkgConfig.cmake#L185-L188
https://github.com/Kitware/CMake/blob/master/Modules/FindPkgConfig.cmake#L383-L387

@JackBoosY JackBoosY changed the title [note] cotire doesn't fully support cmake function FindPkgConfig [pkgconfig] cotire doesn't fully support cmake function FindPkgConfig May 24, 2022
@JackBoosY
Copy link
Author

It looks like cotire has not been updated for a long time, I opened this issue to remind other users that using pkgconfig while using cotire can cause this problem.
The workaround is to manually set PKG_CONFIG_USE_CMAKE_PREFIX_PATH to ON.

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

1 participant