qt5base: add an option to build and install examples
Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
5cb4cd8ef3
commit
467ea8c2ee
@ -28,6 +28,13 @@ config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED
|
|||||||
|
|
||||||
See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
|
See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
|
||||||
|
|
||||||
|
config BR2_PACKAGE_QT5BASE_EXAMPLES
|
||||||
|
bool "Compile and install examples (with code)"
|
||||||
|
select BR2_PACKAGE_QT5BASE_NETWORK
|
||||||
|
select BR2_PACKAGE_QT5BASE_XML
|
||||||
|
help
|
||||||
|
If unsure, say N.
|
||||||
|
|
||||||
config BR2_PACKAGE_QT5BASE_NETWORK
|
config BR2_PACKAGE_QT5BASE_NETWORK
|
||||||
bool "network module"
|
bool "network module"
|
||||||
help
|
help
|
||||||
|
@ -134,6 +134,8 @@ QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2)
|
|||||||
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu)
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu)
|
||||||
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
|
||||||
|
|
||||||
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples
|
||||||
|
|
||||||
# Build the list of libraries to be installed on the target
|
# Build the list of libraries to be installed on the target
|
||||||
QT5BASE_INSTALL_LIBS_y += Qt5Core
|
QT5BASE_INSTALL_LIBS_y += Qt5Core
|
||||||
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network
|
||||||
@ -162,8 +164,9 @@ define QT5BASE_CONFIGURE_CMDS
|
|||||||
-headerdir /usr/include/qt5 \
|
-headerdir /usr/include/qt5 \
|
||||||
-sysroot $(STAGING_DIR) \
|
-sysroot $(STAGING_DIR) \
|
||||||
-plugindir /usr/lib/qt/plugins \
|
-plugindir /usr/lib/qt/plugins \
|
||||||
|
-examplesdir /usr/lib/qt/examples \
|
||||||
-no-rpath \
|
-no-rpath \
|
||||||
-nomake examples -nomake tests \
|
-nomake tests \
|
||||||
-device buildroot \
|
-device buildroot \
|
||||||
-device-option CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
|
-device-option CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
|
||||||
-device-option BUILDROOT_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
|
-device-option BUILDROOT_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
@ -203,15 +206,24 @@ define QT5BASE_INSTALL_TARGET_FONTS
|
|||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define QT5BASE_INSTALL_TARGET_EXAMPLES
|
||||||
|
if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
|
||||||
|
mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
|
||||||
|
cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
||||||
define QT5BASE_INSTALL_TARGET_CMDS
|
define QT5BASE_INSTALL_TARGET_CMDS
|
||||||
$(QT5BASE_INSTALL_TARGET_FONTS)
|
$(QT5BASE_INSTALL_TARGET_FONTS)
|
||||||
|
$(QT5BASE_INSTALL_TARGET_EXAMPLES)
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
define QT5BASE_INSTALL_TARGET_CMDS
|
define QT5BASE_INSTALL_TARGET_CMDS
|
||||||
$(QT5BASE_INSTALL_TARGET_LIBS)
|
$(QT5BASE_INSTALL_TARGET_LIBS)
|
||||||
$(QT5BASE_INSTALL_TARGET_PLUGINS)
|
$(QT5BASE_INSTALL_TARGET_PLUGINS)
|
||||||
$(QT5BASE_INSTALL_TARGET_FONTS)
|
$(QT5BASE_INSTALL_TARGET_FONTS)
|
||||||
|
$(QT5BASE_INSTALL_TARGET_EXAMPLES)
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user