Make Tight encoding optional

pull/8/head
Andri Yngvason 2019-12-31 10:13:21 +00:00
parent 02611765bd
commit ad0ff6b27c
3 changed files with 16 additions and 3 deletions

View File

@ -35,7 +35,7 @@ libm = cc.find_library('m', required: false)
pixman = dependency('pixman-1') pixman = dependency('pixman-1')
libuv = dependency('libuv') libuv = dependency('libuv')
libturbojpeg = dependency('libturbojpeg') libturbojpeg = dependency('libturbojpeg', required: get_option('tight-encoding'))
inc = include_directories('include', 'contrib/miniz') inc = include_directories('include', 'contrib/miniz')
@ -44,7 +44,6 @@ sources = [
'src/util.c', 'src/util.c',
'src/vec.c', 'src/vec.c',
'src/zrle.c', 'src/zrle.c',
'src/tight.c',
'src/raw-encoding.c', 'src/raw-encoding.c',
'src/pixels.c', 'src/pixels.c',
'src/damage.c', 'src/damage.c',
@ -56,9 +55,21 @@ dependencies = [
libm, libm,
pixman, pixman,
libuv, libuv,
libturbojpeg,
] ]
config = configuration_data()
if libturbojpeg.found()
dependencies += libturbojpeg
sources += 'src/tight.c'
config.set('ENABLE_TIGHT', true)
endif
configure_file(
output: 'config.h',
configuration: config,
)
neatvnc = shared_library( neatvnc = shared_library(
'neatvnc', 'neatvnc',
sources, sources,

View File

@ -0,0 +1 @@
option('tight-encoding', type: 'feature', value: 'disabled', description: 'Enable Tight encoding (experimental)')

View File

@ -25,6 +25,7 @@
#include "neatvnc.h" #include "neatvnc.h"
#include "common.h" #include "common.h"
#include "pixels.h" #include "pixels.h"
#include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>