Re: CMakeLists.txt for fontconfig library (enables native compilation on windows)

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

 



> -----Original Message-----
> From: Pavel Koshevoy [mailto:pkoshevoy@xxxxxxxxx]
> Sent: 06 October 2012 04:40
> To: Diego Santa Cruz
> Cc: fontconfig@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  CMakeLists.txt for fontconfig library (enables
> native compilation on windows)
> 
> Turns out the only reason my cmake project worked was because I had
previously
> run ./configure and it generated those .h files for me.  I need to figure
out
> a way to generate them via cmake instead.  I would appreciate if you would
> share your vs2008 project.
> 

Please find attached my VS2005 project as patch.

The fc-case.c, fc-glyphname.c and fc-lang.c build utilities are built via a
custom build step and each have as stated output the corresponding .exe file
name. The fccase.tmpl.h, fcglyphname.tmpl.h and fclang.tmpl.h also have a
custom build step each, stating the corresponding final header file (e.g.,
fccase.h) as output and the necessary .exe as dependency, so that they
automatically run. The dependencies are not perfect, but good enough to build
fontconfig out of its source tree.

The solution also has a pre-link build event that generates the .def file for
the DLL and a post-build event that installs the library, include and
configuration files according to our in-house conventions.

Some of the custom build steps use perl to process the info. For instance the
fclang.tmlp.h custom build step extracts the list of orth files from the
Makefile.am file via perl, instead of recopying the list into the VS project
because that always ends up being out of sync at one point.

Note that the header files such as fccase.h are not created in an object file
output directory but right in the source tree because MSVC looks for #include
"xxxx.h" in the directory of the file containing the include directive and
not in the current directory as GCC does. If the files were created elsewhere
the ones picked up would be the ones in the source distribution and not the
ones created in the custom build steps.

The config.h file I generated manually, starting from the config.h.in and the
config.h generated by configure under Linux x86. I do not see how it could be
easily auto-generated.

Also note that the VS project has some of our in-house conventions, like
generating a debug version of the lib (linked with the debug runtime) with
the "d" suffix, looks for include and lib dependencies in an external
directory, uses .so as the extension for most import libs instead of .lib,
etc.

If people are interested in a cleaned-up version of this VS project to
include in the fontconfig distribution I would be glad to create one.

One thing that I have not yet solved is how to properly implement the
FcFStatFs() function for Win32. I will be sending a separate message to the
ml about it.

Best,

-- 
Diego Santa Cruz, PhD
Technology Architect
________________________________
SpinetiX S.A.
http://www.spinetix.com
________________________________

Attachment: fc-msvc-proj.patch
Description: fc-msvc-proj.patch

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux