-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Added pkgconfig file for GLFW #17100
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 6 commits
cbea96f
cfb2473
dc00137
3cf8288
f3aa365
4d8637c
211f806
07067c1
c00f6af
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,4 @@ | ||
| Name: GLFW | ||
| Description: A multi-platform library for OpenGL, window and input | ||
| Version: 3.2.1 | ||
| Libs: -sUSE_GLFW=3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,6 +135,18 @@ def metafunc(self, backend): | |
| return metafunc | ||
|
|
||
|
|
||
| def requires_pkg_config(func): | ||
| assert callable(func) | ||
|
|
||
| @wraps(func) | ||
| def decorated(self, *args, **kwargs): | ||
| if not utils.which('pkg-config'): | ||
|
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. Can you add a
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. Sure, done in 211f806 |
||
| self.fail('pkg-config is required to run this test') | ||
| return func(self, *args, **kwargs) | ||
|
|
||
| return decorated | ||
|
|
||
|
|
||
| class other(RunnerCore): | ||
| def assertIsObjectFile(self, filename): | ||
| self.assertTrue(building.is_wasm(filename)) | ||
|
|
@@ -805,14 +817,25 @@ def test_cmake_find_modules(self): | |
| self.assertContained('AL_VERSION: 1.1', output) | ||
| self.assertContained('SDL version: 2.0.', output) | ||
|
|
||
| @requires_pkg_config | ||
| def test_cmake_find_pkg_config(self): | ||
| if not utils.which('pkg-config'): | ||
| self.fail('pkg-config is required to run this test') | ||
| out = self.run_process([EMCMAKE, 'cmake', test_file('cmake/find_pkg_config')], stdout=PIPE).stdout | ||
| libdir = shared.Cache.get_sysroot_dir('local', 'lib', 'pkgconfig') | ||
| libdir += os.path.pathsep + shared.Cache.get_sysroot_dir('lib', 'pkgconfig') | ||
| self.assertContained('PKG_CONFIG_LIBDIR: ' + libdir, out) | ||
|
|
||
| @requires_pkg_config | ||
| def test_pkg_config_packages(self): | ||
| packages = [ | ||
| ('egl', '10.2.2'), | ||
| ('glesv2', '10.2.2'), | ||
| ('glfw3', '3.2.1'), | ||
| ('sdl', '1.2.15'), | ||
| ] | ||
| for package, version in packages: | ||
| out = self.run_process([emmake, 'pkg-config', '--modversion', package], stdout=PIPE).stdout | ||
| self.assertContained(version, out) | ||
|
|
||
| def test_system_include_paths(self): | ||
| # Verify that all default include paths are within `emscripten/system` | ||
|
|
||
|
|
||
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 just landed a change to reformat this list into multiple lines, so I'm afraid you will need to rebase this.
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.
Sure, no worries.