blob: 1f2f8aecf7172d5ef0655a6273ea8b4e6262ec55 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 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