Skip to content

Commit

Permalink
Fix decoding error in pkg_config.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvander authored and WildCard65 committed Jul 21, 2020
1 parent ddc991f commit 1840f9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ambuild2/frontend/v2_1/cpp/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
# along with AMBuild. If not, see <http://www.gnu.org/licenses/>.
import copy
import subprocess
import sys
from ambuild2.frontend.v2_1.cpp import builders
from ambuild2 import util

# Base compiler object.
class Compiler(object):
Expand Down Expand Up @@ -170,6 +172,7 @@ def StaticLibraryProject(self, name):
@staticmethod
def run_pkg_config(argv):
output = subprocess.check_output(args = ['pkg-config'] + argv)
output = util.DecodeConsoleText(sys.stdout, output)
return [item.strip() for item in output.strip().split(' ') if item.strip() != '']

# Helper for running pkg-config.
Expand Down

0 comments on commit 1840f9c

Please sign in to comment.