build: Install easy-setup headers 94/110494/2
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 16 Jan 2017 20:01:50 +0000 (21:01 +0100)
committerJooseok Park <jooseok.park@samsung.com>
Tue, 17 Jan 2017 03:45:32 +0000 (12:45 +0900)
It look like project public headers
 are installed to 2 level depth
 subdirectories (service/$domain/*.h*)

Change-Id: Ia7a66caf5381d24b56f0c5ac1a91929eff9ba7d7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16445
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/easy-setup/SConscript
service/easy-setup/enrollee/SConscript
service/easy-setup/mediator/richsdk/SConscript

index cf42a58..5972ccf 100755 (executable)
 Import('env')
 
 es_target = env.get ('TARGET_OS')
+service_easy_setup_env = env.Clone()
 
-if es_target in ['linux']:
-   SConscript('mediator/SConscript')
-   SConscript('enrollee/SConscript')
+if es_target in ['android', 'ios', 'linux']:
+    SConscript('mediator/SConscript')
 
-if es_target in ['android','ios']:
-   SConscript('mediator/SConscript')
+if es_target in ['linux', 'tizen']:
+    SConscript('enrollee/SConscript')
 
-if es_target in ['tizen']:
-   SConscript('enrollee/SConscript')
+if es_target in ['android', 'ios', 'linux', 'tizen']:
+    service_easy_setup_env.UserInstallTargetHeader('inc/escommon.h', 'service/easy-setup', 'escommon.h')
index b80fc90..c740000 100644 (file)
@@ -110,6 +110,8 @@ if target_os in ['linux', 'tizen']:
        enrollee_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', es_enrollee_common_src)
        enrollee_env.InstallTarget([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee')
        enrollee_env.UserInstallTargetLib([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee')
+       enrollee_env.UserInstallTargetHeader('inc/ESEnrolleeCommon.h', 'service/easy-setup', 'ESEnrolleeCommon.h')
+       enrollee_env.UserInstallTargetHeader('inc/easysetup.h', 'service/easy-setup', 'easysetup.h')
 
 if target_os == 'arduino':
        es_enrollee_common_src = ['./src/easysetup.c','./src/resourcehandler.c']
index e2142d3..fef80d1 100755 (executable)
@@ -146,6 +146,10 @@ if target_os in ['android','linux','ios']:
                easy_setup_env.InstallTarget(es_sdk_shared, 'libESMediatorRich')
                easy_setup_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libESMediatorRich.so'])
 
+filenames = [ 'ESRichCommon.h', 'EasySetup.h', 'RemoteEnrollee.h' ]
+for filename in filenames:
+       easy_setup_env.UserInstallTargetHeader('inc/' + filename, "service/easy-setup", filename)
+
 print "Files path is %s" % env.get('es_src')
 
 ######################################################################