Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings #276

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ set(merged_compile_definitions_public
${target_specific_public_definitions}
)
set(merged_compile_definitions_private
-DOSMAND_USE_HARFBUZZ
${target_specific_private_definitions}
)
set(merged_include_dirs_private
Expand Down
57 changes: 53 additions & 4 deletions externals/freetype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,87 @@ project(freetype2)

prepare_upstream()

set(target_specific_sources "")
if (CMAKE_TARGET_OS STREQUAL "macosx" OR CMAKE_TARGET_OS STREQUAL "ios" OR CMAKE_TARGET_OS STREQUAL "linux" OR CMAKE_TARGET_OS STREQUAL "android")
set(target_specific_sources "${target_specific_sources}"
"upstream.patched/builds/unix/ftsystem.c"
)
elseif (CMAKE_TARGET_OS STREQUAL "windows")
set(target_specific_sources "${target_specific_sources}"
"upstream.patched/builds/windows/ftsystem.c"
)
else ()
set(target_specific_sources "${target_specific_sources}"
"upstream.patched/src/base/ftsystem.c"
)
endif ()

add_library(freetype2_static STATIC
"upstream.patched/src/autofit/autofit.c"
"upstream.patched/src/base/ftbase.c"
"upstream.patched/src/base/ftbbox.c"
"upstream.patched/src/base/ftbdf.c"
"upstream.patched/src/base/ftbitmap.c"
"upstream.patched/src/base/ftcid.c"
"upstream.patched/src/base/ftfstype.c"
"upstream.patched/src/base/ftgasp.c"
"upstream.patched/src/base/ftglyph.c"
"upstream.patched/src/base/ftgxval.c"
"upstream.patched/src/base/ftinit.c"
"upstream.patched/src/base/ftlcdfil.c"
"upstream.patched/src/base/ftmm.c"
"upstream.patched/src/base/ftotval.c"
"upstream.patched/src/base/ftpatent.c"
"upstream.patched/src/base/ftpfr.c"
"upstream.patched/src/base/ftstroke.c"
"upstream.patched/src/base/ftsystem.c"
"upstream.patched/src/base/ftsynth.c"
"upstream.patched/src/base/fttype1.c"
"upstream.patched/src/base/ftxf86.c"
"upstream.patched/src/autofit/autofit.c"
"upstream.patched/src/base/ftwinfnt.c"
"upstream.patched/src/bdf/bdf.c"
"upstream.patched/src/bzip2/ftbzip2.c"
"upstream.patched/src/cache/ftcache.c"
"upstream.patched/src/cff/cff.c"
"upstream.patched/src/cid/type1cid.c"
"upstream.patched/src/gzip/ftgzip.c"
"upstream.patched/src/lzw/ftlzw.c"
"upstream.patched/src/pcf/pcf.c"
"upstream.patched/src/pfr/pfr.c"
"upstream.patched/src/psaux/psaux.c"
"upstream.patched/src/pshinter/pshinter.c"
"upstream.patched/src/psnames/psnames.c"
"upstream.patched/src/raster/raster.c"
"upstream.patched/src/sdf/sdf.c"
"upstream.patched/src/sfnt/sfnt.c"
"upstream.patched/src/smooth/smooth.c"
"upstream.patched/src/truetype/truetype.c"
"upstream.patched/src/type1/type1.c"
"upstream.patched/src/type42/type42.c"
"upstream.patched/src/winfonts/winfnt.c"
"upstream.patched/src/base/ftdebug.c"
${target_specific_sources}
)
add_dependencies(freetype2_static
z_static
)

check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("fcntl.h" HAVE_FCNTL_H)
configure_file("ftconfig.h.in" "ftconfig-override.h")

target_compile_definitions(freetype2_static
PRIVATE
-DFT2_BUILD_LIBRARY
-DFT_CONFIG_MODULES_H=<ftmodule-override.h>
-DFT_CONFIG_OPTIONS_H=<ftoption-override.h>
-DFT_CONFIG_CONFIG_H=<ftconfig-override.h>
)
target_include_directories(freetype2_static
PRIVATE
"."
"${CMAKE_CURRENT_BINARY_DIR}"
PUBLIC
"upstream.patched/include"
)
target_link_libraries(freetype2_static
LINK_PUBLIC
z_static
)
2 changes: 1 addition & 1 deletion externals/freetype/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ fi
SRCLOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$SRCLOC/../../../build/utils/functions.sh"

prepareUpstreamFromTarArchive "$SRCLOC" "http://builder.osmand.net/dependencies-mirror/freetype-2.5.0.1.tar.bz2"
prepareUpstreamFromGit "$SRCLOC" "https://github.com/freetype/freetype.git" "12ef831fc314518bff45278008a568608501a8e4"
patchUpstream "$SRCLOC"
15 changes: 15 additions & 0 deletions externals/freetype/ftconfig.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef FTCONFIG_H_
#define FTCONFIG_H_

#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H

#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_FCNTL_H

#include <freetype/config/integer-types.h>
#include <freetype/config/public-macros.h>
#include <freetype/config/mac-support.h>

#endif /* FTCONFIG_H_ */
2 changes: 0 additions & 2 deletions externals/freetype/ftmodule-override.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
Loading