summaryrefslogtreecommitdiffstats
path: root/package/qtuio/qtuio.mk
blob: b2c93068e0734b2c9d97533b759717562d721dca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
################################################################################
#
# qtuio
#
################################################################################

QTUIO_VERSION = abe4973ff6
QTUIO_SITE = git://github.com/x29a/qTUIO.git
QTUIO_INSTALL_STAGING = YES
QTUIO_DEPENDENCIES = qt

QTUIO_LICENSE = GPLv3+
QTUIO_LICENSE_FILES = COPYING

# The pong example needs QtOpenGL support, which might become available
# some time in the future. Then add pong to the list of examples.
QTUIO_EXAMPLES = dials fingerpaint knobs pinchzoom

ifeq ($(BR2_QTUIO_EXAMPLES),y)
define QTUIO_CONFIGURE_EXAMPLES
	for example in $(QTUIO_EXAMPLES) ; do \
		(cd $(@D)/examples/$${example} && $(QT_QMAKE)) ; \
	done
endef
endif

define QTUIO_CONFIGURE_CMDS
	cd $(@D)/src && $(QT_QMAKE)
	$(QTUIO_CONFIGURE_EXAMPLES)
endef

ifeq ($(BR2_QTUIO_EXAMPLES),y)
define QTUIO_BUILD_EXAMPLES
	for example in $(QTUIO_EXAMPLES) ; do \
		($(MAKE) -C $(@D)/examples/$${example}) ; \
	done
endef
endif

define QTUIO_BUILD_CMDS
	$(MAKE) -C $(@D)/src
	$(QTUIO_BUILD_EXAMPLES)
endef

# Unfortunately, there is no working "install" target available
ifeq ($(BR2_QTUIO_EXAMPLES),y)
define QTUIO_INSTALL_EXAMPLES
	for example in $(QTUIO_EXAMPLES) ; do \
		($(INSTALL) -D -m 0755 $(@D)/examples/$${example}/$${example} $(TARGET_DIR)/usr/share/qtuio/$${example}) ; \
	done
endef
endif

define QTUIO_INSTALL_TARGET_CMDS
	cp -dpf $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib
	$(QTUIO_INSTALL_EXAMPLES)
endef

define QTUIO_INSTALL_STAGING_CMDS
	cp -dpf $(@D)/lib/libqTUIO.so* $(STAGING_DIR)/usr/lib
endef

define QTUIO_CLEAN_CMDS
	$(MAKE) -C $(@D)/src clean
	for example in $(QTUIO_EXAMPLES) ; do \
		($(MAKE) -C $(@D)/examples/$${example} clean) ; \
	done
endef

$(eval $(generic-package))