-
Notifications
You must be signed in to change notification settings - Fork 3.5k
pkgconfig variables support in CMake toolchain file #17101
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
Changes from 9 commits
5c1f039
cc7b0f7
8bc8ec2
6e8ae1c
f3a4d51
d439aa8
86b81fa
15f7812
bfc2f5a
e80be51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| cmake_minimum_required(VERSION 3.0) | ||
| project(find_pkg_config) | ||
|
|
||
| message(STATUS "PKG_CONFIG_LIBDIR: $ENV{PKG_CONFIG_LIBDIR}") | ||
|
|
||
| find_package(PkgConfig REQUIRED QUIET) | ||
| if (NOT PKG_CONFIG_FOUND) | ||
| message(FATAL_ERROR "Could not find pkg-config executable!") | ||
| endif() | ||
|
|
||
| message(STATUS "Check that all .pc files shipped with Emscripten can be located correctly") | ||
| pkg_check_modules(EGL REQUIRED egl) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a comment here:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a message explaining what the script is trying to do. I reworded it a bit to not contain the list of packages, so that adding a new package won't require modifying the message on top of everything else. I guess we could just go with a full-pledged list and then iterate, create some nice message and so on, but I feel like that'd be an overkill for a test and I'd rather have it dumb simple. |
||
| pkg_check_modules(GLESV2 REQUIRED glesv2) | ||
| pkg_check_modules(SDL2 REQUIRED sdl) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should also set PKG_CONFIG_SYSROOT_DIR here? (doesn't have to be part of this change).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to leave it out for now. We'd want to get consistent behaviour for CMake and building.py and PKG_CONFIG_SYSROOT_DIR can easily become a journey on its own (LIBDIR is good enough for most use cases, and SYSROOT affects only the PATH, not LIBDIR).