From 4d74700c46ae2050447fce17a4c0419ebdd93275 Mon Sep 17 00:00:00 2001 From: asozinov Date: Fri, 9 Aug 2024 15:15:45 +0100 Subject: [PATCH] glTF support Add rapidjson to SALOME for support glTF export CAS compilation with rapidjson support --- products/env_scripts/rapidjson.py | 19 ++++++++++++++ products/rapidjson.pyconf | 41 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 products/env_scripts/rapidjson.py create mode 100644 products/rapidjson.pyconf diff --git a/products/env_scripts/rapidjson.py b/products/env_scripts/rapidjson.py new file mode 100644 index 0000000..eb5c6a9 --- /dev/null +++ b/products/env_scripts/rapidjson.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('RAPIDJSONDIR', prereq_dir) + env.set('RAPIDJSON_ROOT_DIR', prereq_dir) # update for cmake + env.prepend('PATH', os.path.join(prereq_dir, 'bin')) + if platform.system() == "Windows" : + env.prepend('LIBS', os.path.join(prereq_dir, 'lib')) + else: + env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) + +def set_nativ_env(env): + #env.set('RAPIDJSON_ROOT_DIR', '/usr') # update for cmake + #env.set('RAPIDJSONDIR', '/usr') + pass diff --git a/products/rapidjson.pyconf b/products/rapidjson.pyconf new file mode 100644 index 0000000..630140c --- /dev/null +++ b/products/rapidjson.pyconf @@ -0,0 +1,41 @@ +default : +{ + name : "rapidjson" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["rapidjson"] + rpm_dev : ["rapidjson-devel"] + apt : [] + apt_dev : [] + } + patches : [] + environ : + { + env_script : $name + ".py" + } + depend : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + incremental : "yes" + single_install_dir : "yes" + } +} + +version_1_1_0: +{ + compil_script : "rapidjson-1.1.0.sh" + patches : [] +} + +version_1_1_0_win: +{ + compil_script : "rapidjson.bat" + patches : [] +} + -- 2.39.2