1 #******************************************************************
3 # Copyright 2014 Samsung Electronics All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # plugin-manager project build script
27 # Add third party libraries
29 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
30 plugin_manager_env = lib_env.Clone()
32 target_os = env.get('TARGET_OS')
33 ######################################################################
35 ######################################################################
36 plugin_manager_env.AppendUnique(CPPPATH = [
37 '../lib/cpluff/libcpluff',
42 if target_os not in ['windows', 'winrt']:
43 plugin_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall',
44 '-fpermissive', '-Wsign-compare'])
46 if target_os == 'android':
47 plugin_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
48 plugin_manager_env.AppendUnique(LIBS = ['boost_thread-gcc-mt-1_49', 'gnustl_static'])
50 plugin_manager_env.AppendUnique(CPPDEFINES = ['CP_C_API=CP_EXPORT',
51 'CP_HOST=\"\\"'+env.get('TARGET_OS')+'\\"\"',
52 'CP_DATADIR=\"\\\"/usr/local/share\\\"\"',
55 'CP_THREADS=\"\\\"Posix\\"\"',
56 'CP_SHREXT=\"\\".so\\"\"',
57 'CP_FNAMESEP_CHAR=\"\'/\'\"',
58 'CP_FNAMESEP_STR=\"\\\"/\\"\"',
59 'PACKAGE=\"\\\"cpluff\\\"\"'])
62 plugin_manager_env.AppendUnique(LIBS = ['oc', 'octbstack', 'expat', 'dl'])
63 ######################################################################
64 # Source files and Targets
65 ######################################################################
66 ppm_src = ['src/Plugin.cpp', 'src/PluginManager.cpp']
67 ppm = plugin_manager_env.StaticLibrary('ppm', ppm_src)
70 'src/CpluffAdapter.cpp',
71 'src/FelixAdapter.cpp',
73 'src/PluginManagerImpl.cpp',
76 pmimpl_env = plugin_manager_env.Clone()
77 pmimpl_env.PrependUnique(CCFLAGS = ['-fPIC'])
78 pmimpl_env.PrependUnique(LIBS = File(env.get('BUILD_DIR') + '/libcpluff.a'))
79 pmimpl = pmimpl_env.SharedLibrary('pmimpl', pmimpl_src)
81 plugin_manager_env.InstallTarget([ppm, pmimpl], 'libppm')