external/freetype/Module_freetype.mk        |   15 +++++
 external/freetype/StaticLibrary_freetype.mk |   72 ++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 1 deletion(-)

New commits:
commit 20a3b2014e93acd76499013ef7c41f670d598bc3
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Tue Feb 25 19:52:15 2025 +0200
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Dec 2 09:29:00 2025 +0100

    Add possibility to build freetype for Windows
    
    As a StaticLibrary for now. Using our build mechanism, not its own
    configury and makefilery. This commit does not yet actually add any
    configury to get it built, BUILD_TYPE will never contain FREETYPE on
    Windows. Running "make freetype" won't work.
    
    Change-Id: I30dc2ece4e69687ea02a407f8b2fbbfe70e79ba2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194570
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/external/freetype/Module_freetype.mk 
b/external/freetype/Module_freetype.mk
index 290014c47dfd..47032db6ba85 100644
--- a/external/freetype/Module_freetype.mk
+++ b/external/freetype/Module_freetype.mk
@@ -10,8 +10,21 @@
 $(eval $(call gb_Module_Module,freetype))
 
 $(eval $(call gb_Module_add_targets,freetype,\
-       ExternalProject_freetype \
        UnpackedTarball_freetype \
 ))
 
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Module_add_targets,freetype,\
+       StaticLibrary_freetype \
+))
+
+else
+
+$(eval $(call gb_Module_add_targets,freetype,\
+       ExternalProject_freetype \
+))
+
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/freetype/StaticLibrary_freetype.mk 
b/external/freetype/StaticLibrary_freetype.mk
new file mode 100644
index 000000000000..086237fa4a28
--- /dev/null
+++ b/external/freetype/StaticLibrary_freetype.mk
@@ -0,0 +1,72 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# This is de facto just for Windows for now
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,freetype))
+
+$(eval $(call gb_StaticLibrary_set_include,freetype,\
+       -I$(call gb_UnpackedTarball_get_dir,freetype)/include \
+       $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,freetype,\
+       -DZ_PREFIX \
+       -DFT2_BUILD_LIBRARY \
+       -DFT_DEBUG_LOGGING \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,freetype,\
+       $(addprefix UnpackedTarball/freetype/, \
+               builds/windows/ftdebug \
+               builds/windows/ftsystem \
+               src/autofit/autofit \
+               src/base/ftbase \
+               src/base/ftbbox \
+               src/base/ftbdf \
+               src/base/ftbitmap \
+               src/base/ftcid \
+               src/base/ftfstype \
+               src/base/ftgasp \
+               src/base/ftglyph \
+               src/base/ftgxval \
+               src/base/ftinit \
+               src/base/ftmm \
+               src/base/ftotval \
+               src/base/ftpatent \
+               src/base/ftpfr \
+               src/base/ftstroke \
+               src/base/ftsynth \
+               src/base/fttype1 \
+               src/base/ftwinfnt \
+               src/bdf/bdf \
+               src/cache/ftcache \
+               src/cff/cff \
+               src/cid/type1cid \
+               src/dlg/dlg \
+               src/gzip/ftgzip \
+               src/lzw/ftlzw \
+               src/pcf/pcf \
+               src/pfr/pfr \
+               src/psaux/psaux \
+               src/pshinter/pshinter \
+               src/psnames/psmodule \
+               src/raster/raster \
+               src/sdf/sdf \
+               src/sfnt/sfnt \
+               src/smooth/smooth \
+               src/svg/svg \
+               src/truetype/truetype \
+               src/type1/type1 \
+               src/type42/type42 \
+               src/winfonts/winfnt \
+       ) \
+))
+
+# vim: set noet sw=4 ts=4:

Reply via email to