Browse Source

Added nanovg submodule

tags/v0.3.0
Andrew Belt 7 years ago
parent
commit
109a38e53c
5 changed files with 15 additions and 11 deletions
  1. +3
    -0
      .gitmodules
  2. +5
    -5
      Makefile
  3. +1
    -0
      ext/nanovg
  4. +2
    -2
      include/widgets.hpp
  5. +4
    -4
      src/gui.cpp

+ 3
- 0
.gitmodules View File

@@ -0,0 +1,3 @@
[submodule "ext/nanovg"]
path = ext/nanovg
url = https://github.com/memononen/nanovg.git

+ 5
- 5
Makefile View File

@@ -1,18 +1,18 @@
ARCH ?= linux ARCH ?= linux
CFLAGS = -MMD -g -Wall -O2 CFLAGS = -MMD -g -Wall -O2
CXXFLAGS = -MMD -g -Wall -std=c++11 -O3 -ffast-math -fno-exceptions \ CXXFLAGS = -MMD -g -Wall -std=c++11 -O3 -ffast-math -fno-exceptions \
-I./lib -I./include
-I./ext -I./include
LDFLAGS = LDFLAGS =


SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \ SOURCES = $(wildcard src/*.cpp src/*/*.cpp) \
lib/nanovg/src/nanovg.c
ext/nanovg/src/nanovg.c




# Linux # Linux
ifeq ($(ARCH), linux) ifeq ($(ARCH), linux)
CC = gcc CC = gcc
CXX = g++ CXX = g++
SOURCES += lib/noc/noc_file_dialog.c
SOURCES += ext/noc/noc_file_dialog.c
CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0) CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0)
CXXFLAGS += -DLINUX CXXFLAGS += -DLINUX
LDFLAGS += -rdynamic -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi -lsamplerate \ LDFLAGS += -rdynamic -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi -lsamplerate \
@@ -24,7 +24,7 @@ endif
ifeq ($(ARCH), apple) ifeq ($(ARCH), apple)
CC = clang CC = clang
CXX = clang++ CXX = clang++
SOURCES += lib/noc/noc_file_dialog.m
SOURCES += ext/noc/noc_file_dialog.m
CFLAGS += -DNOC_FILE_DIALOG_OSX CFLAGS += -DNOC_FILE_DIALOG_OSX
CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/include CXXFLAGS += -DAPPLE -stdlib=libc++ -I$(HOME)/local/include
LDFLAGS += -stdlib=libc++ -L$(HOME)/local/lib -lpthread -lglew -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -ldl -ljansson -lportaudio -lportmidi -lsamplerate LDFLAGS += -stdlib=libc++ -L$(HOME)/local/lib -lpthread -lglew -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -ldl -ljansson -lportaudio -lportmidi -lsamplerate
@@ -38,7 +38,7 @@ endif
ifeq ($(ARCH), windows) ifeq ($(ARCH), windows)
CC = x86_64-w64-mingw32-gcc CC = x86_64-w64-mingw32-gcc
CXX = x86_64-w64-mingw32-g++ CXX = x86_64-w64-mingw32-g++
SOURCES += lib/noc/noc_file_dialog.c
SOURCES += ext/noc/noc_file_dialog.c
CFLAGS += -DNOC_FILE_DIALOG_WIN32 CFLAGS += -DNOC_FILE_DIALOG_WIN32
CXXFLAGS += -DWINDOWS -D_USE_MATH_DEFINES -DGLEW_STATIC \ CXXFLAGS += -DWINDOWS -D_USE_MATH_DEFINES -DGLEW_STATIC \
-I$(HOME)/pkg/portaudio-r1891-build/include -I$(HOME)/pkg/portaudio-r1891-build/include


+ 1
- 0
ext/nanovg

@@ -0,0 +1 @@
Subproject commit 8feae63a46fdf8ed83613b6a46da25d44adde07f

+ 2
- 2
include/widgets.hpp View File

@@ -8,8 +8,8 @@


#include <jansson.h> #include <jansson.h>


#include "../lib/nanovg/src/nanovg.h"
#include "../lib/oui/blendish.h"
#include "../ext/nanovg/src/nanovg.h"
#include "../ext/oui/blendish.h"


#include "util.hpp" #include "util.hpp"




+ 4
- 4
src/gui.cpp View File

@@ -6,14 +6,14 @@


// #define NANOVG_GLEW // #define NANOVG_GLEW
#define NANOVG_IMPLEMENTATION #define NANOVG_IMPLEMENTATION
#include "../lib/nanovg/src/nanovg.h"
#include "../ext/nanovg/src/nanovg.h"
#define NANOVG_GL2_IMPLEMENTATION #define NANOVG_GL2_IMPLEMENTATION
#include "../lib/nanovg/src/nanovg_gl.h"
#include "../ext/nanovg/src/nanovg_gl.h"
#define BLENDISH_IMPLEMENTATION #define BLENDISH_IMPLEMENTATION
#include "../lib/oui/blendish.h"
#include "../ext/oui/blendish.h"


extern "C" { extern "C" {
#include "../lib/noc/noc_file_dialog.h"
#include "../ext/noc/noc_file_dialog.h"
} }






Loading…
Cancel
Save