# prepend xlm SDK lib to LD_LIBRARY_PATH when the package is sourced
_prepend_if_not_empty() {
    local var="$1"
    local value="$2"
    if [ -n "$value" ]; then
        if [ -z "${!var}" ]; then
            export "$var"="$value"
        else
            export "$var"="$value:${!var}"
        fi
    fi
}
_prepend_if_not_empty "LD_LIBRARY_PATH" "@XLM_SDK_ROOT@/lib"
