nanosvg: build implementation in extra c file

Speed up development iterations by building the nanosvg implementation
only once. Especially on the PinePhone it takes a bit.
This commit is contained in:
Oliver Smith 2022-07-31 21:10:07 +02:00 committed by Caleb Connolly
parent 36b0e6780b
commit fc5f065269
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
3 changed files with 11 additions and 3 deletions

View file

@ -1,6 +1,7 @@
src = [ src = [
'pbsplash.c',
'animate.c', 'animate.c',
'nanosvg.c',
'pbsplash.c',
] ]
executable('pbsplash', src, executable('pbsplash', src,

9
src/nanosvg.c Normal file
View file

@ -0,0 +1,9 @@
/* Build the nanosvg implementation here, to build it only once and have other
* C files build fast during development. */
#include <stdio.h>
#define NANOSVG_IMPLEMENTATION
#include "nanosvg.h"
#define NANOSVGRAST_IMPLEMENTATION
#include "nanosvgrast.h"

View file

@ -14,9 +14,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords. #define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords.
#define NANOSVG_IMPLEMENTATION // Expands implementation
#include "nanosvg.h" #include "nanosvg.h"
#define NANOSVGRAST_IMPLEMENTATION
#include "nanosvgrast.h" #include "nanosvgrast.h"
#include "pbsplash.h" #include "pbsplash.h"