Commit 7a06fda9 authored by André Anjos's avatar André Anjos 💬
Browse files

Try a fix on the opencv library listing from pkg-config

parent de5bc237
......@@ -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])
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment