Commit Graph

4 Commits

Author SHA1 Message Date
Emanuel Schmidt
eb998d7b65 Separate meson build options for demos and tests 2023-02-08 20:56:05 +01:00
Chun-wei Fan
7331d2b4e3 thread-test.c: Use Windows Threading API on Windows
...When we don't have a pthreads implementation available, which is
normally the case on Windows.  This attempts to make it easier for people
on Windows to verify whether their builds of Pixman (and Cairo component,
if applicable) are thread-safe.  Also, make the number of threads
a #define, so if we need to change it at some point, it's easier.

This re-enables the thread-test program on Windows in Meson builds.
2019-11-19 05:50:28 +08:00
Chun-wei Fan
7661b1fae9 build: Don't assume PThreads if threading support is found
Look also for pthread.h if threading support is found by Meson, as the
underlying threading support may not be PThreads, depending on platform.

For now, disable the thread-test test program if pthread.h and if
necessary, the PThreads library, cannot be found, as the current
implementation assumes the use of PThreads.

Also bump the required Meson version to 0.50.0 since we need it for
-cc.get_argument_syntax()
-For a later commit, the has_headers sub-method for cc.find_library()
2019-11-19 05:49:35 +08:00
Dylan Baker
199a3bd275 meson: Add a meson build system
This commit adds a meson build system for pixman. It carries the usual
improvements of meson, better clean build time, much better incremental
build times, while being simpler and easier to understand.

This takes advantage of some features from the most recent versions of
meson: the builtin openmp dependency and the feature option type.

There are a couple of things that I've done a bit differently than the
autotools build system, I've built a libdemos which is the utilities
from the demos folder, and I've linked the demos with libtestutils from
tetsts, otherwise I expect that most things will be the same.

I've tested so far cross compiling from x86_64 -> x86, x86_64 ->
Aarch64, and Linux to Windows via mingw, as well as native x86_64 Linux
builds which all work. I've also built with mingw nativly, there are
some test failures there. An MSVC build can be generated, but fails.

v2: - set WORDS_BIGENDIAN in the config for big endian systems.
2018-11-29 16:57:01 +00:00