build: pkgconfig should link ocmapi too
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 20 Oct 2016 11:54:36 +0000 (13:54 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Tue, 25 Oct 2016 10:56:14 +0000 (10:56 +0000)
Change-Id: Ide4901338ba919b36cf129be5ecefc6f4f71d519
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13525
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
build_common/SConscript
iotivity.pc.in

index 4554e03..f848a0f 100644 (file)
@@ -335,12 +335,17 @@ if env.get('ROUTING') == 'GW':
 elif env.get('ROUTING') == 'EP':
     defines.append('-DROUTING_EP=1')
 
+libs = []
+if env.get('SECURED'):
+    libs.append('-locpmapi')
+
 pc_vars = {
     '\@VERSION\@': project_version,
     '\@PREFIX\@': user_prefix,
     '\@EXEC_PREFIX\@': user_prefix,
     '\@LIB_INSTALL_DIR\@': user_lib,
-    '\@DEFINES\@': " ".join(defines)
+    '\@DEFINES\@': " ".join(defines),
+    '\@LIBS\@': " ".join(libs)
 }
 
 env.Substfile(pc_file, SUBST_DICT = pc_vars)
index f5c06c9..f5c7c39 100644 (file)
@@ -11,7 +11,7 @@ Description: IoTivity is an open source reference implementation of the OIC stan
 Version: @VERSION@
 URL: https://www.iotivity.org
 Requires:
-Libs: -L${libdir} -loc -loc_logger -loc_logger_core -loctbstack -lconnectivity_abstraction
+Libs: -L${libdir} -loc -loc_logger -loc_logger_core -loctbstack -lconnectivity_abstraction @LIBS@
 Cflags: -I${includedir}/resource \
                        -I${includedir}/c_common \
                        -I${svcincludedir}/resource-encapsulation \