8001922: Improve freetype handling
Reviewed-by: erikj
This commit is contained in:
parent
ce42afa263
commit
e4ff601011
@ -215,39 +215,37 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# make sure freetype dll will be available at runtime as well as link time
|
||||
#
|
||||
# NB: Default freetype build system uses -h linker option and
|
||||
# result .so contains hardcoded library name that is later
|
||||
# used for adding dependencies to other objects
|
||||
# (e.g. libfontmanager.so).
|
||||
#
|
||||
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
|
||||
# without overcomplicating logic here.
|
||||
# To workaround this we hardcode .6 suffix for now.
|
||||
#
|
||||
# Note that .so.6 library will not be found by System.loadLibrary()
|
||||
# but fortunately we need to load FreeType library explicitly
|
||||
# on windows only
|
||||
#
|
||||
#TODO: rework this to avoid hardcoding library name in the makefile
|
||||
#
|
||||
ifdef OPENJDK
|
||||
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
|
||||
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
|
||||
#
|
||||
# NB: Default freetype build system uses -h linker option and
|
||||
# result .so contains hardcoded library name that is later
|
||||
# used for adding dependencies to other objects
|
||||
# (e.g. libfontmanager.so).
|
||||
#
|
||||
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
|
||||
# without overcomplicating logic here.
|
||||
# To workaround this we hardcode .6 suffix for now.
|
||||
#
|
||||
# Note that .so.6 library will not be found by System.loadLibrary()
|
||||
# but fortunately we need to load FreeType library explicitly
|
||||
# on windows only
|
||||
#
|
||||
#TODO: rework this to avoid hardcoding library name in the makefile
|
||||
#
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
|
||||
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
|
||||
else
|
||||
ifeq ($(USING_SYSTEM_FT_LIB), false)
|
||||
FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
|
||||
endif
|
||||
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
|
||||
endif
|
||||
|
||||
$(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
|
||||
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
|
||||
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
|
||||
$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
$(CHMOD) +rx $@
|
||||
endif
|
||||
|
||||
COPY_FILES += $(FREETYPE_LIB)
|
||||
COPY_FILES += $(FREETYPE_TARGET_LIB)
|
||||
endif
|
||||
|
||||
##########################################################################################
|
||||
|
@ -780,9 +780,9 @@ ifndef OPENJDK
|
||||
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
|
||||
else
|
||||
FONT_HEADERS := $(FREETYPE2_CFLAGS)
|
||||
FONT_HEADERS := $(FREETYPE_CFLAGS)
|
||||
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/libfontmanager/mapfile-vers.openjdk
|
||||
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE2_LIBS)
|
||||
BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
|
||||
endif
|
||||
|
||||
LIBFONTMANAGER_OPTIMIZATION := HIGH
|
||||
|
Loading…
x
Reference in New Issue
Block a user