build: Propagate RPATH for crosscompilers
Without this change,
depended libraries need to be specified explitly to linker.
Observed problem on Yocto:
i586-poky-linux/i586-poky-linux-g++ (...) \
-Lout/yocto/i586/release (...) \
-lipca -lc_common -llogger -ldl -lpthread -luuid -lrt -lmbedcrypto (...)
i586-poky-linux/6.3.0/ld: warning: liboc.so, \
needed by out/yocto/i586/release/libipca.so, not found \
(try using -rpath or -rpath-link) (...) \
out/yocto/i586/release/libipca.so: \
undefined reference to `OC::operator<<(std::ostream&, OC::AttributeType)'
Change-Id: I1dcbf18af601415c2261b44185a84225a2869281
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20273
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>