freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] [PATCH 2/2] [cmake] add support for customized ftsystem on Wi


From: Hin-Tak Leung
Subject: [ft-devel] [PATCH 2/2] [cmake] add support for customized ftsystem on Windows (Re: Freetype-devel Digest, Vol 153, Issue 20)
Date: Mon, 30 Oct 2017 11:58:15 +0000 (UTC)

> Date: Mon, 30 Oct 2017 12:34:52 +0500
> From: "Azamat H. Hackimov" <address@hidden>
> To: address@hidden
> Subject: [ft-devel] [PATCH 2/2] [cmake]
> add support for customized
>     ftsystem on Windows
>  ---
>  CMakeLists.txt | 19
> +++++++++++++++----
>  1 file changed, 15 insertions(+), 4
> deletions(-)
 
> diff --git a/CMakeLists.txt
> b/CMakeLists.txt
> index 8115f1a4b..e3878c874 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -291,7 +291,6 @@ set(BASE_SRCS
>    src/base/ftpfr.c
>    src/base/ftstroke.c
>    src/base/ftsynth.c
> -  src/base/ftsystem.c
>    src/base/fttype1.c
>    src/base/ftwinfnt.c
>    src/bdf/bdf.c
> @@ -316,11 +315,23 @@ set(BASE_SRCS
>  )
  
>  if (WIN32)
> -  set(BASE_SRCS ${BASE_SRCS}
> builds/windows/ftdebug.c)
> +  if( ${CMAKE_SYSTEM_VERSION}
> VERSION_GREATER 5.0 ) # Windows 2000
> +   
> add_definitions(-DUNICODE=1)
> +  endif()
> +  set(BASE_SRCS ${BASE_SRCS}
> +     
> builds/windows/ftdebug.c
> +     
> builds/windows/ftsystem.c
> +      )
>  elseif (WINCE)
> -  set(BASE_SRCS ${BASE_SRCS}
> builds/wince/ftdebug.c)
> +  set(BASE_SRCS ${BASE_SRCS}
> +     
> builds/wince/ftdebug.c
> +     
> src/base/ftsystem.c
> +      )
>  else ()
> -  set(BASE_SRCS ${BASE_SRCS}
> src/base/ftdebug.c)
> +  set(BASE_SRCS ${BASE_SRCS}
> +     
> src/base/ftdebug.c
> +     
> src/base/ftsystem.c
> +      )
>  endif ()

This patch set looks wrong - you seem to be special-casing windows, copying and 
forking the two files, src/base/ftdebug.c ,  src/base/ftsystem.c to 
builds/windows/ftdebug.c , builds/windows/ftsystem.c , builds/wince/ftdebug.c .

I think you need to explain better (1) why special-casing and forking is 
necessary, (2) why you cannot doing a lot of "#ifdef __WIN32" and "#ifdef 
__WINCE" etc to keep the variants small and to do the special-casing all in the 
parent files.

Also, fopen on windows can open non-ascii file names, I think. It is just a 
byte stream.






  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]