qt5base.mk 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. ################################################################################
  2. #
  3. # qt5base
  4. #
  5. ################################################################################
  6. QT5BASE_VERSION = $(QT5_VERSION)
  7. QT5BASE_SITE = $(QT5_SITE)
  8. QT5BASE_SOURCE = qtbase-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5BASE_VERSION).tar.xz
  9. QT5BASE_DEPENDENCIES = host-pkgconf zlib
  10. QT5BASE_INSTALL_STAGING = YES
  11. # A few comments:
  12. # * -no-pch to workaround the issue described at
  13. # http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
  14. # * -system-zlib because zlib is mandatory for Qt build, and we
  15. # want to use the Buildroot packaged zlib
  16. # * -system-pcre because pcre is mandatory to build Qt, and we
  17. # want to use the one packaged in Buildroot
  18. QT5BASE_CONFIGURE_OPTS += \
  19. -optimized-qmake \
  20. -no-cups \
  21. -no-iconv \
  22. -system-zlib \
  23. -system-pcre \
  24. -no-pch \
  25. -shared
  26. ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
  27. QT5BASE_DEPENDENCIES += pcre
  28. else
  29. QT5BASE_DEPENDENCIES += pcre2
  30. endif
  31. ifeq ($(BR2_X86_CPU_HAS_SSE2),)
  32. QT5BASE_CONFIGURE_OPTS += -no-sse2
  33. else ifeq ($(BR2_X86_CPU_HAS_SSE3),)
  34. QT5BASE_CONFIGURE_OPTS += -no-sse3
  35. else ifeq ($(BR2_X86_CPU_HAS_SSSE3),)
  36. QT5BASE_CONFIGURE_OPTS += -no-ssse3
  37. else ifeq ($(BR2_X86_CPU_HAS_SSE4),)
  38. QT5BASE_CONFIGURE_OPTS += -no-sse4.1
  39. else ifeq ($(BR2_X86_CPU_HAS_SSE42),)
  40. QT5BASE_CONFIGURE_OPTS += -no-sse4.2
  41. else ifeq ($(BR2_X86_CPU_HAS_AVX),)
  42. QT5BASE_CONFIGURE_OPTS += -no-avx
  43. else ifeq ($(BR2_X86_CPU_HAS_AVX2),)
  44. QT5BASE_CONFIGURE_OPTS += -no-avx2
  45. else
  46. # no buildroot BR2_X86_CPU_HAS_AVX512 option yet for qt configure
  47. # option '-no-avx512' (available for latest only)
  48. endif
  49. ifeq ($(BR2_PACKAGE_LIBDRM),y)
  50. QT5BASE_CONFIGURE_OPTS += -kms
  51. QT5BASE_DEPENDENCIES += libdrm
  52. else
  53. QT5BASE_CONFIGURE_OPTS += -no-kms
  54. endif
  55. # Uses libgbm from mesa3d
  56. ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
  57. QT5BASE_CONFIGURE_OPTS += -gbm
  58. QT5BASE_DEPENDENCIES += mesa3d
  59. else
  60. QT5BASE_CONFIGURE_OPTS += -no-gbm
  61. endif
  62. ifeq ($(BR2_ENABLE_DEBUG),y)
  63. QT5BASE_CONFIGURE_OPTS += -debug
  64. else
  65. QT5BASE_CONFIGURE_OPTS += -release
  66. endif
  67. ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
  68. QT5BASE_CONFIGURE_OPTS += -largefile
  69. endif
  70. QT5BASE_CONFIGURE_OPTS += -opensource -confirm-license
  71. ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
  72. QT5BASE_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
  73. QT5BASE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPLv3 LICENSE.FDL
  74. else
  75. QT5BASE_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3 (docs)
  76. QT5BASE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
  77. endif
  78. ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
  79. QT5BASE_LICENSE := $(QT5BASE_LICENSE), BSD-3-Clause (examples)
  80. QT5BASE_LICENSE_FILES += header.BSD
  81. endif
  82. QT5BASE_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_QT5BASE_CONFIG_FILE))
  83. ifneq ($(QT5BASE_CONFIG_FILE),)
  84. QT5BASE_CONFIGURE_OPTS += -qconfig buildroot
  85. endif
  86. ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
  87. QT5BASE_DEPENDENCIES += udev
  88. endif
  89. # Qt5 SQL Plugins
  90. ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y)
  91. ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y)
  92. QT5BASE_CONFIGURE_OPTS += -plugin-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config
  93. QT5BASE_DEPENDENCIES += mysql
  94. else
  95. QT5BASE_CONFIGURE_OPTS += -no-sql-mysql
  96. endif
  97. ifeq ($(BR2_PACKAGE_QT5BASE_PSQL),y)
  98. QT5BASE_CONFIGURE_OPTS += -plugin-sql-psql -psql_config $(STAGING_DIR)/usr/bin/pg_config
  99. QT5BASE_DEPENDENCIES += postgresql
  100. else
  101. QT5BASE_CONFIGURE_OPTS += -no-sql-psql
  102. endif
  103. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_QT),-plugin-sql-sqlite)
  104. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),-system-sqlite)
  105. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite)
  106. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite)
  107. endif
  108. ifeq ($(BR2_PACKAGE_QT5BASE_GUI),y)
  109. QT5BASE_CONFIGURE_OPTS += -gui -system-freetype
  110. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5_VERSION_5_6),-I$(STAGING_DIR)/usr/include/freetype2)
  111. QT5BASE_DEPENDENCIES += freetype
  112. else
  113. QT5BASE_CONFIGURE_OPTS += -no-gui -no-freetype
  114. endif
  115. ifeq ($(BR2_PACKAGE_QT5BASE_HARFBUZZ),y)
  116. ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),y)
  117. # system harfbuzz in case __sync for 4 bytes is supported
  118. QT5BASE_CONFIGURE_OPTS += -system-harfbuzz
  119. QT5BASE_DEPENDENCIES += harfbuzz
  120. else
  121. # qt harfbuzz otherwise (using QAtomic instead)
  122. QT5BASE_CONFIGURE_OPTS += -qt-harfbuzz
  123. QT5BASE_LICENSE := $(QT5BASE_LICENSE), MIT (harfbuzz)
  124. QT5BASE_LICENSE_FILES += src/3rdparty/harfbuzz-ng/COPYING
  125. endif
  126. else
  127. QT5BASE_CONFIGURE_OPTS += -no-harfbuzz
  128. endif
  129. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
  130. # We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
  131. # is to add a link against the "inuxfb" library.
  132. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
  133. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
  134. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb)
  135. ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
  136. QT5BASE_CONFIGURE_OPTS += -xcb -system-xkbcommon
  137. QT5BASE_DEPENDENCIES += \
  138. libxcb \
  139. xcb-util-wm \
  140. xcb-util-image \
  141. xcb-util-keysyms \
  142. xlib_libX11 \
  143. libxkbcommon
  144. ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
  145. QT5BASE_DEPENDENCIES += xlib_libXext
  146. endif
  147. else
  148. QT5BASE_CONFIGURE_OPTS += -no-xcb
  149. endif
  150. ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP),y)
  151. QT5BASE_CONFIGURE_OPTS += -opengl desktop
  152. QT5BASE_DEPENDENCIES += libgl
  153. else ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_ES2),y)
  154. QT5BASE_CONFIGURE_OPTS += -opengl es2
  155. QT5BASE_DEPENDENCIES += libgles
  156. else
  157. QT5BASE_CONFIGURE_OPTS += -no-opengl
  158. endif
  159. QT5BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT5BASE_DEFAULT_QPA))
  160. QT5BASE_CONFIGURE_OPTS += $(if $(QT5BASE_DEFAULT_QPA),-qpa $(QT5BASE_DEFAULT_QPA))
  161. ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y)
  162. QT5BASE_CONFIGURE_OPTS += -eglfs
  163. QT5BASE_DEPENDENCIES += libegl
  164. else
  165. QT5BASE_CONFIGURE_OPTS += -no-eglfs
  166. endif
  167. ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
  168. # No OpenSSL 1.1.x support in Qt 5.6.x
  169. QT5BASE_CONFIGURE_OPTS += -no-openssl
  170. else
  171. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_OPENSSL),-openssl,-no-openssl)
  172. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_OPENSSL),openssl)
  173. endif
  174. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),-fontconfig,-no-fontconfig)
  175. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),fontconfig)
  176. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GIF),,-no-gif)
  177. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_JPEG),-system-libjpeg,-no-libjpeg)
  178. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_JPEG),jpeg)
  179. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_PNG),-system-libpng,-no-libpng)
  180. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_PNG),libpng)
  181. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DBUS),-dbus,-no-dbus)
  182. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DBUS),dbus)
  183. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),-tslib,-no-tslib)
  184. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),tslib)
  185. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_LIBGLIB2),-glib,-no-glib)
  186. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2)
  187. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu)
  188. QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
  189. QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples
  190. ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
  191. # gstreamer 0.10 support is broken in qt5multimedia
  192. ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y)
  193. QT5BASE_CONFIGURE_OPTS += -gstreamer 1.0
  194. QT5BASE_DEPENDENCIES += gst1-plugins-base
  195. else
  196. QT5BASE_CONFIGURE_OPTS += -no-gstreamer
  197. endif
  198. endif
  199. ifeq ($(BR2_PACKAGE_LIBINPUT),y)
  200. QT5BASE_CONFIGURE_OPTS += -libinput
  201. QT5BASE_DEPENDENCIES += libinput
  202. else
  203. QT5BASE_CONFIGURE_OPTS += -no-libinput
  204. endif
  205. ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
  206. # only enable gtk support if libgtk3 X11 backend is enabled
  207. ifeq ($(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_LIBGTK3_X11),yy)
  208. QT5BASE_CONFIGURE_OPTS += -gtk
  209. QT5BASE_DEPENDENCIES += libgtk3
  210. else
  211. QT5BASE_CONFIGURE_OPTS += -no-gtk
  212. endif
  213. endif
  214. # Build the list of libraries to be installed on the target
  215. QT5BASE_INSTALL_LIBS_y += Qt5Core
  216. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XCB) += Qt5XcbQpa
  217. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network
  218. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent
  219. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL) += Qt5Sql
  220. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST) += Qt5Test
  221. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml
  222. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL
  223. ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
  224. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFSDeviceIntegration
  225. ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
  226. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFsKmsSupport
  227. endif
  228. else
  229. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglDeviceIntegration
  230. endif
  231. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI) += Qt5Gui
  232. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS) += Qt5Widgets
  233. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
  234. QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
  235. ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
  236. ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
  237. # use vivante backend
  238. QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_viv
  239. else ifeq ($(BR2_PACKAGE_SUNXI_MALI)$(BR2_PACKAGE_SUNXI_MALI_MAINLINE),y)
  240. # use mali backend
  241. QT5BASE_EGLFS_DEVICE = EGLFS_DEVICE_INTEGRATION = eglfs_mali
  242. endif
  243. endif
  244. ifneq ($(QT5BASE_CONFIG_FILE),)
  245. define QT5BASE_CONFIGURE_CONFIG_FILE
  246. cp $(QT5BASE_CONFIG_FILE) $(@D)/src/corelib/global/qconfig-buildroot.h
  247. endef
  248. endif
  249. QT5BASE_ARCH_CONFIG_FILE = $(@D)/mkspecs/devices/linux-buildroot-g++/arch.conf
  250. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC)$(BR2_PACKAGE_QT5_VERSION_LATEST),yy)
  251. # Qt 5.8 needs atomics, which on various architectures are in -latomic
  252. define QT5BASE_CONFIGURE_ARCH_CONFIG
  253. printf 'LIBS += -latomic\n' >$(QT5BASE_ARCH_CONFIG_FILE)
  254. endef
  255. endif
  256. # This allows to use ccache when available
  257. define QT5BASE_CONFIGURE_HOSTCC
  258. $(SED) 's,^QMAKE_CC\s*=.*,QMAKE_CC = $(HOSTCC),' $(@D)/mkspecs/common/g++-base.conf
  259. $(SED) 's,^QMAKE_CXX\s*=.*,QMAKE_CXX = $(HOSTCXX),' $(@D)/mkspecs/common/g++-base.conf
  260. endef
  261. # Must be last so can override all options set by Buildroot
  262. QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS))
  263. define QT5BASE_CONFIGURE_CMDS
  264. mkdir -p $(@D)/mkspecs/devices/linux-buildroot-g++/
  265. sed 's/@EGLFS_DEVICE@/$(QT5BASE_EGLFS_DEVICE)/g' \
  266. $(QT5BASE_PKGDIR)/qmake.conf.in > \
  267. $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf
  268. $(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \
  269. $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
  270. $(QT5BASE_CONFIGURE_CONFIG_FILE)
  271. touch $(QT5BASE_ARCH_CONFIG_FILE)
  272. $(QT5BASE_CONFIGURE_ARCH_CONFIG)
  273. $(QT5BASE_CONFIGURE_HOSTCC)
  274. (cd $(@D); \
  275. $(TARGET_MAKE_ENV) \
  276. PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
  277. MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" \
  278. ./configure \
  279. -v \
  280. -prefix /usr \
  281. -hostprefix $(HOST_DIR) \
  282. -headerdir /usr/include/qt5 \
  283. -sysroot $(STAGING_DIR) \
  284. -plugindir /usr/lib/qt/plugins \
  285. -examplesdir /usr/lib/qt/examples \
  286. -no-rpath \
  287. -nomake tests \
  288. -device buildroot \
  289. -device-option CROSS_COMPILE="$(TARGET_CROSS)" \
  290. -device-option BR_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
  291. -device-option BR_COMPILER_CXXFLAGS="$(TARGET_CXXFLAGS)" \
  292. $(QT5BASE_CONFIGURE_OPTS) \
  293. )
  294. endef
  295. define QT5BASE_BUILD_CMDS
  296. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
  297. endef
  298. # The file "qt.conf" can be used to override the hard-coded paths that are
  299. # compiled into the Qt library. We need it to make "qmake" relocatable.
  300. define QT5BASE_INSTALL_QT_CONF
  301. sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
  302. $(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
  303. endef
  304. define QT5BASE_INSTALL_STAGING_CMDS
  305. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
  306. $(QT5_LA_PRL_FILES_FIXUP)
  307. $(QT5BASE_INSTALL_QT_CONF)
  308. endef
  309. define QT5BASE_INSTALL_TARGET_LIBS
  310. for lib in $(QT5BASE_INSTALL_LIBS_y); do \
  311. cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib || exit 1 ; \
  312. done
  313. endef
  314. define QT5BASE_INSTALL_TARGET_PLUGINS
  315. if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
  316. mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
  317. cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
  318. fi
  319. endef
  320. ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
  321. define QT5BASE_INSTALL_TARGET_FONTS
  322. if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \
  323. mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \
  324. cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \
  325. fi
  326. endef
  327. endif
  328. define QT5BASE_INSTALL_TARGET_EXAMPLES
  329. if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
  330. mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
  331. cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
  332. fi
  333. endef
  334. ifeq ($(BR2_STATIC_LIBS),y)
  335. define QT5BASE_INSTALL_TARGET_CMDS
  336. $(QT5BASE_INSTALL_TARGET_FONTS)
  337. $(QT5BASE_INSTALL_TARGET_EXAMPLES)
  338. endef
  339. else
  340. define QT5BASE_INSTALL_TARGET_CMDS
  341. $(QT5BASE_INSTALL_TARGET_LIBS)
  342. $(QT5BASE_INSTALL_TARGET_PLUGINS)
  343. $(QT5BASE_INSTALL_TARGET_FONTS)
  344. $(QT5BASE_INSTALL_TARGET_EXAMPLES)
  345. endef
  346. endif
  347. $(eval $(generic-package))