shithub: freetype+ttf2subf

Download patch

ref: a82c45d53b6ba3e26c8be2e12dadc5a450e2b8f4
parent: 682c27195b88161be21cf2743eb167ce99a51598
author: Werner Lemberg <[email protected]>
date: Sun Aug 2 14:35:49 EDT 2015

* CMakeLists.txt: Improve shared library support.

Based on a patch from John Cary <[email protected]>.

git/fs: mount .git/fs: mount/attach disallowed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,11 @@
   endif ()
 endif ()
 
+if (WIN32 AND BUILD_SHARED_LIBS)
+  message(FATAL_ERROR "Shared libraries not supported on Windows.")
+endif ()
 
+
 project(freetype)
 
 
@@ -136,7 +140,9 @@
 set(VERSION_MAJOR "2")
 set(VERSION_MINOR "6")
 set(VERSION_PATCH "0")
+
 set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
+set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
 
 
 # Compiler definitions for building the library
@@ -300,6 +306,15 @@
   ${PRIVATE_HEADERS}
   ${BASE_SRCS}
 )
+
+
+if (BUILD_SHARED_LIBS)
+  set_target_properties(freetype PROPERTIES
+    VERSION ${PROJECT_VERSION}
+    SOVERSION ${SHARED_LIBRARY_VERSION}
+    COMPILE_DEFINITIONS freetype_EXPORTS
+  )
+endif ()
 
 
 if (BUILD_FRAMEWORK)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2015-08-02  Werner Lemberg  <[email protected]>
 
+	* CMakeLists.txt: Improve shared library support.
+
+	Based on a patch from John Cary <[email protected]>.
+
+2015-08-02  Werner Lemberg  <[email protected]>
+
 	* builds/unix/freetype-config.in (enable_shared): Remove.  Unused.
 
 2015-08-02  Werner Lemberg  <[email protected]>