summaryrefslogtreecommitdiff
path: root/forstio/async
diff options
context:
space:
mode:
Diffstat (limited to 'forstio/async')
-rw-r--r--forstio/async/SConscript30
1 files changed, 18 insertions, 12 deletions
diff --git a/forstio/async/SConscript b/forstio/async/SConscript
index 0b1e7dd..69f8950 100644
--- a/forstio/async/SConscript
+++ b/forstio/async/SConscript
@@ -9,24 +9,30 @@ Import('env')
dir_path = Dir('.').abspath
-env.sources += sorted(glob.glob(dir_path + "/*.cpp"))
-env.headers += sorted(glob.glob(dir_path + "/*.h"))
-
# Environment for base library
-base_lib_env = env.Clone();
+async_env = env.Clone();
+
+async_env.sources = sorted(glob.glob(dir_path + "/*.cpp"))
+async_env.headers = sorted(glob.glob(dir_path + "/*.h"))
+
+env.sources += async_env.sources;
+env.headers += async_env.headers;
## Shared lib
objects_shared = []
-base_lib_env.add_source_files(objects_shared, env.sources, shared=True);
-env.library_shared = base_lib_env.SharedLibrary('#build/forstio-async', [objects_shared]);
+async_env.add_source_files(objects_shared, async_env.sources, shared=True);
+async_env.library_shared = async_env.SharedLibrary('#build/forstio-async', [objects_shared]);
## Static lib
objects_static = []
-base_lib_env.add_source_files(objects_static, env.sources, shared=False);
-env.library_static = base_lib_env.StaticLibrary('#build/forstio-async', [objects_static]);
-
-# Export to other libs
-Export('base_lib_env')
+async_env.add_source_files(objects_static, async_env.sources, shared=False);
+async_env.library_static = async_env.StaticLibrary('#build/forstio-async', [objects_static]);
# Set Alias
-env.Alias('library', [env.library_shared, env.library_static]);
+env.Alias('library_async', [async_env.library_shared, async_env.library_static]);
+
+env.targets += ['library_async'];
+
+# Install
+env.Install('$prefix/lib/', [async_env.library_shared, async_env.library_static]);
+env.Install('$prefix/include/forstio/async/', [async_env.headers]);