~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/link.py

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/python
 
2
 
 
3
 
 
4
 
 
5
text_file = open("install/lib/pkgconfig/opencv.pc", "r")
 
6
lines = text_file.readlines()
 
7
 
 
8
for l in lines:
 
9
        if 'Libs' in l:
 
10
                flags = (l.strip().replace("${exec_prefix}","$(PAPARAZZI_HOME)/sw/ext/opencv_bebop/install").split(" -"))
 
11
                iterflags = iter(flags)
 
12
                next(iterflags)
 
13
                for f in iterflags:
 
14
                        print("\t<flag name=\"LDFLAGS\" value=\"" + f + "\" />" )
 
15
 
 
16
 
 
17
 
 
18
text_file.close()