build: Correcting library detection
When detecting location of the library, `includes` and `libpath`
variables must be used instead of `cxxflags` and `linkflags`. While the
latter also makes everything work, it results in unexpected behavior:
waf always adds LINKFLAGS* in the beginning of the linking command,
which can screw up order in which libraries are selected (e.g.,
system-installed library can be chosen instead of the compiled version).
Change-Id: I9ed36e8a4e8523b33ca2e88414aed8de5111c9cd
diff --git a/.waf-tools/openssl.py b/.waf-tools/openssl.py
index e2ba7d0..a6b6c76 100644
--- a/.waf-tools/openssl.py
+++ b/.waf-tools/openssl.py
@@ -32,8 +32,8 @@
define_name='HAVE_%s' % var,
uselib_store=var,
mandatory=mandatory,
- cxxflags="-I%s/include" % root,
- linkflags="-L%s/lib" % root)
+ includes="%s/include" % root,
+ libpath="%s/lib" % root)
else:
libcrypto = self.check_cxx(lib=['ssl', 'crypto'],
msg='Checking for OpenSSL library',