blob: 0d033f3610159405065667b3a2c58d2c97005528 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001require ${BPN}.inc
2
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05004
Brad Bishop8410d612019-11-25 09:40:59 -05005inherit features_check binconfig lib_package gtk-icon-cache mime
Brad Bishop316dfdd2018-06-25 12:45:53 -04006REQUIRED_DISTRO_FEATURES = "x11"
7
Brad Bishope42b3e32020-01-15 22:08:42 -05008SRC_URI += " \
9 file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch \
10 file://0004-Fix-build-error-when-enable-package-config-examples.patch \
11"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012
13EXTRA_OECMAKE = " \
14 -DOPTION_BUILD_SHARED_LIBS=ON \
15 -DOPTION_USE_THREADS=ON \
16 -DOPTION_USE_XDBE=ON \
17 -DOPTION_USE_XFT=ON \
18 -DFLTK_CONFIG_PATH=${libdir}/cmake \
19"
20
21PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
22
Brad Bishope42b3e32020-01-15 22:08:42 -050023PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,fltk-native"
Brad Bishop316dfdd2018-06-25 12:45:53 -040024PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
26PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
27PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
28PACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor"
29
30do_install_append() {
31 sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config
32}
33
34python populate_packages_prepend () {
35 if (d.getVar('DEBIAN_NAMES')):
36 d.setVar('PKG_${BPN}', 'libfltk${PV}')
37}
38
39LEAD_SONAME = "libfltk.so"
40
Brad Bishop316dfdd2018-06-25 12:45:53 -040041# .desktop / icons / mime only necessary for fluid app
42FILES_${PN}-bin += " \
43 ${datadir}/applications \
44 ${datadir}/icons \
45 ${datadir}/mime \
46"
47
48# cmake files
49FILES_${PN}-dev += "${datadir}/fltk"