forked from minhngoc25a/freetype2
* CMakeLists.txt: Improve shared library support.
Based on a patch from John Cary <cary@txcorp.com>.
This commit is contained in:
parent
682c27195b
commit
a82c45d53b
|
@ -100,6 +100,10 @@ else ()
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (WIN32 AND BUILD_SHARED_LIBS)
|
||||||
|
message(FATAL_ERROR "Shared libraries not supported on Windows.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
project(freetype)
|
project(freetype)
|
||||||
|
|
||||||
|
@ -136,7 +140,9 @@ endif ()
|
||||||
set(VERSION_MAJOR "2")
|
set(VERSION_MAJOR "2")
|
||||||
set(VERSION_MINOR "6")
|
set(VERSION_MINOR "6")
|
||||||
set(VERSION_PATCH "0")
|
set(VERSION_PATCH "0")
|
||||||
|
|
||||||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||||
|
set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||||
|
|
||||||
|
|
||||||
# Compiler definitions for building the library
|
# Compiler definitions for building the library
|
||||||
|
@ -302,6 +308,15 @@ add_library(freetype
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if (BUILD_SHARED_LIBS)
|
||||||
|
set_target_properties(freetype PROPERTIES
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||||
|
COMPILE_DEFINITIONS freetype_EXPORTS
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
if (BUILD_FRAMEWORK)
|
if (BUILD_FRAMEWORK)
|
||||||
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
|
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
|
||||||
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
|
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-08-02 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* CMakeLists.txt: Improve shared library support.
|
||||||
|
|
||||||
|
Based on a patch from John Cary <cary@txcorp.com>.
|
||||||
|
|
||||||
2015-08-02 Werner Lemberg <wl@gnu.org>
|
2015-08-02 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* builds/unix/freetype-config.in (enable_shared): Remove. Unused.
|
* builds/unix/freetype-config.in (enable_shared): Remove. Unused.
|
||||||
|
|
Loading…
Reference in New Issue