Browse Source

Updated option to bool, because meson's feature option doesn't do the thing

master
dirkson 3 years ago
parent
commit
68ebd207cf
  1. 4
      build
  2. 13
      meson.build
  3. 2
      meson_options.txt

4
build

@ -221,7 +221,7 @@ fi
#Check if our CC changed. If it did, clean
if [ -e "$MDIR/osmia/cc" ]; then
if [ "$CC" = $(cat $MDIR/osmia/cc) ]; then
echo "S"
echo "-----------------------!!!!!!"
fi
fi
@ -236,6 +236,7 @@ fi
mkdir -p $MDIR/osmia/ 2> /dev/null
if [ ! -d "$MDIR/$DIR" ]; then
echo $CC > $MDIR/osmia/cc
export CC="$CACHE $CC"
#Run meson if required
mkdir $MDIR/$DIR
@ -247,7 +248,6 @@ if [ ! -d "$MDIR/$DIR" ]; then
echo "osmia: meson returned an error. Please check $MDIR/$DIR/meson-logs/meson-log.txt for more info."
exit 1
fi
echo $CC > $MDIR/osmia/cc
#else
#May wish to look into this in the future
#meson configure $MESONOPTS

13
meson.build

@ -1,15 +1,16 @@
project('lob', 'c', default_options : ['default_library=static', 'c_std=gnu89', 'use_boksi=auto'], subproject_dir : 'meson')
project('lob', 'c', default_options : ['default_library=static', 'c_std=gnu89'], subproject_dir : 'meson')
incdir = include_directories('include')
#option('use_boksi', type : 'feature', value : 'auto', yield : true)
#TinyFileDialogs
#libtinyfd = library('libtinyfd', 'src/dependencies/tinyfiledialogs.c', include_directories : incdir)
#deptinyfd = declare_dependency(link_with : libtinyfd, include_directories : incdir)
subproject('boksi', default_options : ['default_library=static', 'c_std=gnu89'])
depboksi = dependency('boksi', fallback : ['boksi', 'boksi_dep'], required: get_option('use_boksi'))
if not depboksi.found()
if get_option('use_boksi')
subproject('boksi', default_options : ['default_library=static', 'c_std=gnu89'])
depboksi = dependency('boksi', fallback : ['boksi', 'boksi_dep'])
#if not depboksi.found()
#endif
else
add_project_arguments('-DLOB_NO_BOKSI', language : 'c')
endif

2
meson_options.txt

@ -1 +1 @@
option('use_boksi', type : 'feature', value : 'auto', yield : true)
option('use_boksi', type : 'boolean', value : 'true', yield : true)
Loading…
Cancel
Save