Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / service / notification / cpp-wrapper / examples / linux / SConscript
index 14c344a..8099c35 100755 (executable)
@@ -43,8 +43,10 @@ notification_sample_env.AppendUnique(CPPPATH = ['../../../src/common'])
 notification_sample_env.PrependUnique(LIBS = [
        'liboctbstack',
        'oc_logger',
+       'oc',
        'connectivity_abstraction',
-       'libcoap'
+       'libcoap',
+        'resource_directory'
        ])
 
 notification_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x','-frtti'])
@@ -68,6 +70,24 @@ if not env.get('RELEASE'):
 if env.get('WITH_CLOUD') == True:
        notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
 
+with_mq = env.get('WITH_MQ')
+if 'SUB' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
+    print("MQ SUB support")
+
+if 'PUB' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
+    print("MQ PUB support")
+
+if 'BROKER' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
+    print("MQ Broker support")
+
+if env.get('WITH_TCP') == True:
+       notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
+if env.get('SECURED') == '1':
+       notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+
 ####################################################################
 # Source files and Targets
 ######################################################################