Merge branch 'master' of github.com:andlabs/libui

This commit is contained in:
Pietro Gagliardi 2016-01-04 15:49:20 -05:00
commit 24f7c2d803
7 changed files with 45 additions and 2 deletions

11
.travis.yml Normal file
View File

@ -0,0 +1,11 @@
# This makes us use Ubuntu 14 instead of 12
dist: trusty
language: cpp
script:
- sudo apt-get update
- sudo apt-get install libgtk-3-dev -y || sudo apt-cache search libgtk3
- make -f GNUmakefile
- make -f GNUmakefile examples
- make -f GNUmakefile test

View File

@ -57,4 +57,12 @@ test: libui
example: libui
@$(MAKE) -f build/GNUmakefile.example inlibuibuild=1
# TODO examples rule?
# TODO examples rule? --> That's it right ?
examples:
@$(MAKE) -f GNUmakefile example EXAMPLE=histogram
#@$(MAKE) -f GNUmakefile example EXAMPLE=controlgallery
.PHONY: examples
install:
@$(MAKE) -f build/GNUmakefile.libui install inlibuibuild=1

View File

@ -39,3 +39,6 @@ else
endif
include build/GNUbase$(TOOLCHAIN).mk
# install rule is OS specific
include $(OS)/GNUinstall.mk

9
darwin/GNUinstall.mk Normal file
View File

@ -0,0 +1,9 @@
ifndef PREFIX
PREFIX=/usr
endif
# Incorrect for Mac Os X, this should be easy to fix
install: $(OUT)
cp $(OUT) $(DESTDIR)$(PREFIX)/lib/libui.0.dylib
ln -s libui.0.dylib $(DESTDIR)$(PREFIX)/lib/libui.dylib
cp ui.h ui_$(OS).h $(DESTDIR)$(PREFIX)/include/

8
unix/GNUinstall.mk Normal file
View File

@ -0,0 +1,8 @@
ifndef PREFIX
PREFIX=/usr
endif
install: $(OUT)
cp $(OUT) $(DESTDIR)$(PREFIX)/lib/libui.so.0
ln -fs libui.so.0 $(DESTDIR)$(PREFIX)/lib/libui.so
cp ui.h ui_$(OS).h $(DESTDIR)$(PREFIX)/include/

View File

@ -53,8 +53,9 @@ void uiGroupSetChild(uiGroup *g, uiControl *child)
if (g->child != NULL)
childRemove(g->child);
g->child = newChildWithBox(child, uiControl(g), g->container, g->margined);
if (g->child != NULL)
if (g->child != NULL) {
uiControlQueueResize(uiControl(g));
}
}
int uiGroupMargined(uiGroup *g)

3
windows/GNUinstall.mk Normal file
View File

@ -0,0 +1,3 @@
install:
@echo "No install for windows !"
@exit 1