summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2017-12-17 19:21:43 +0100
committerArmin Kuster <akuster808@gmail.com>2017-12-27 07:47:00 -0800
commit85eedcfd2abb00da933d1ce00622df6a0c0c1ba2 (patch)
tree17e420fc5ddc6b5e72ad033009e31c884262e423
parent5a7a0abb179d0418475ca0f491cd1250ac728e44 (diff)
downloadmeta-openembedded-85eedcfd2abb00da933d1ce00622df6a0c0c1ba2.tar.gz
fltk: do not suffix shared library names with '_SHARED'
This avoids unwanted linking against static libraries as happened for yoshimi. Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/fltk/fltk.bb3
-rw-r--r--meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch41
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/fltk/fltk.bb b/meta-oe/recipes-support/fltk/fltk.bb
index 619d1420a..6a3d1c9f9 100644
--- a/meta-oe/recipes-support/fltk/fltk.bb
+++ b/meta-oe/recipes-support/fltk/fltk.bb
@@ -4,6 +4,8 @@ DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
4 4
5inherit binconfig lib_package gtk-icon-cache mime 5inherit binconfig lib_package gtk-icon-cache mime
6 6
7SRC_URI += "file://0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch"
8
7EXTRA_OECMAKE = " \ 9EXTRA_OECMAKE = " \
8 -DOPTION_BUILD_SHARED_LIBS=ON \ 10 -DOPTION_BUILD_SHARED_LIBS=ON \
9 -DOPTION_USE_THREADS=ON \ 11 -DOPTION_USE_THREADS=ON \
@@ -15,6 +17,7 @@ EXTRA_OECMAKE = " \
15PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" 17PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
16 18
17PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF," 19PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,"
20PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
18PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl" 21PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
19PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama" 22PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
20PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes" 23PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
diff --git a/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch b/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
new file mode 100644
index 000000000..1f2f8aecf
--- /dev/null
+++ b/meta-oe/recipes-support/fltk/fltk/0003-CMake-build-Force-shared-libs-with-unsuffixed-names.patch
@@ -0,0 +1,41 @@
1From bc38fb41044503c9debf5710910c51dd29674b6a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Fri, 15 Dec 2017 22:14:01 +0100
4Subject: [PATCH] CMake build: Force shared libs with unsuffixed names
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9For windows build sake CMake complains when a project wants to build shared and
10static libraries with same name. This caused the authors of fltk to generate
11libraries with names suffixed by '_SHARED' when building fltk with cmake -
12autotools builds do not suffix.
13
14Reasons to build shared libs with correct names:
15
16* Shared libraries are the preferred choice for embedded devices
17* There are projects (e.g yoshimi) expecting shared libraries with unsuffixed
18 names - as created by autotools build. These projects link against static
19 libraries by accident causing unusable binaries.
20
21Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
22---
23 CMake/macros.cmake | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/CMake/macros.cmake b/CMake/macros.cmake
27index 4def62d..ab675f0 100644
28--- a/CMake/macros.cmake
29+++ b/CMake/macros.cmake
30@@ -49,7 +49,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
31 PROPERTIES
32 VERSION ${FLTK_VERSION_FULL}
33 SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
34- PREFIX "lib" # for MSVC static/shared coexistence
35+ OUTPUT_NAME ${LIBNAME} CLEAN_DIRECT_OUTPUT 1
36 )
37 endif (${LIBTYPE} STREQUAL "SHARED")
38
39--
402.9.5
41