liboc: add missing depending library
authorHauke Mehrtens <hauke.mehrtens@lantiq.com>
Tue, 21 Jul 2015 18:50:39 +0000 (20:50 +0200)
committerErich Keane <erich.keane@intel.com>
Thu, 23 Jul 2015 21:20:19 +0000 (21:20 +0000)
liboc.so depends on liboctbstack.so, liboc_logger.so and pthread, this
patch adds these dependencies to the build.

Without this the dynamic loader will not automatically load these
libraries and it could result in unresolved dependencies at runtime.

Change-Id: I971b45669adef31dc9cca719884ebeb74aaf735e
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1794
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/src/SConscript

index 621e01c..3a7dd85 100644 (file)
@@ -40,18 +40,20 @@ oclib_env.AppendUnique(CPPPATH = [
                '../csdk/connectivity/lib/libcoap-4.1.1'
                ])
 
+oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+
+oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
+
 target_os = env.get('TARGET_OS')
+if target_os == 'linux':
+       oclib_env.AppendUnique(LIBS = ['pthread'])
+
 if target_os not in ['windows', 'winrt']:
        oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
 
 if target_os == 'android':
        oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-       oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-       oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
-
-if target_os in ['darwin', 'ios']:
-       oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-       oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
+       oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
 
 ######################################################################
 # Source files and Targets