Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.extension
Commits
7a06fda9
Commit
7a06fda9
authored
Aug 25, 2014
by
André Anjos
💬
Browse files
Try a fix on the opencv library listing from pkg-config
parent
de5bc237
Changes
2
Hide whitespace changes
Inline
Side-by-side
bob/extension/__init__.py
View file @
7a06fda9
...
...
@@ -313,6 +313,7 @@ class Extension(DistutilsExtension):
parameters
=
{
'define_macros'
:
generate_self_macros
(
name
,
version
),
'extra_compile_args'
:
[
'-std=c++0x'
],
#synonym for c++11?
'extra_link_args'
:
[],
'library_dirs'
:
[],
'libraries'
:
bob_libraries
,
}
...
...
@@ -384,6 +385,8 @@ class Extension(DistutilsExtension):
parameters
[
'libraries'
]
+=
libs
self
.
pkg_libraries
+=
libs
parameters
[
'extra_link_args'
]
+=
pkg
.
other_libraries
()
# add the -isystem to all system include dirs
for
k
in
system_includes
:
parameters
[
'extra_compile_args'
].
extend
([
'-isystem'
,
k
])
...
...
bob/extension/pkgconfig.py
View file @
7a06fda9
...
...
@@ -261,6 +261,24 @@ class pkgconfig:
return
uniq
(
retval
)
def
other_libraries
(
self
):
"""Returns a pre-processed list containing libraries to link against
Equivalent command line version:
.. code-block:: sh
$ PKG_CONFIG_PATH=<paths> pkg-config --libs-only-other <name>
"""
status
,
stdout
,
stderr
=
self
.
__xcall__
([
'--libs-only-other'
])
if
status
!=
0
:
raise
RuntimeError
(
"error querying --libs-only-other for package `%s': %s"
%
(
self
.
name
,
stderr
))
return
uniq
(
stdout
.
split
())
def
library_directories
(
self
):
"""Returns a pre-processed list containing library directories.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment