Commit 31e59b95 authored by Niklas Haas's avatar Niklas Haas

meson: correctly install the headers

Using install_headers with subdirectories like that breaks completely.
Solve it by just using subdir, which also liberates us from having to
manually list all of the headers.

Due to a weird limitation of subdir(), we're forced to rename our
public include dir to `libplacebo`. So take this opportunity to also
move it to `include/libplacebo`. This has the pretty significant
advantage that you can just use -I to test directly from a local
libplacebo tree, which is a net gain overall.
parent b17c29e1
......@@ -44,14 +44,14 @@ little choice but to license libplacebo the same way.
The public API of libplacebo is currently split up into the following
components, the header files (and documentation) for which are available
inside the [`src/public/`](src/public/) directory. The API is available in
different "tiers", representing levels of abstraction inside libplacebo. The
APIs in higher tiers depend on those in lower tiers. Which tier is used by
a user depends on how much power/control they want over the actual rendering.
The low-level tiers are more suitable for big projects that need strong
control over the entire rendering pipeline; whereas the high-level tiers are
more suitable for smaller or simpler projects that want libplacebo to take
care of everything.
inside the [`src/include/libplacebo`](src/include/libplacebo) directory. The
API is available in different "tiers", representing levels of abstraction
inside libplacebo. The APIs in higher tiers depend on those in lower tiers.
Which tier is used by a user depends on how much power/control they want over
the actual rendering. The low-level tiers are more suitable for big projects
that need strong control over the entire rendering pipeline; whereas the
high-level tiers are more suitable for smaller or simpler projects that want
libplacebo to take care of everything.
### Tier 0 (context, raw math primitives)
......@@ -203,9 +203,9 @@ void main()
```
For a full documentation of the API, refer to the above [API
Overview](#api-overview) as well as the [public header files](src/public/).
You can find additional examples of how to use the various components, in the
[unit tests](src/tests).
Overview](#api-overview) as well as the [public header
files](src/include/libplacebo). You can find additional examples of how to use
the various components, in the [unit tests](src/tests).
I will create more and expanded samples once the project has a bit more
functionality worth writing home about.
......
......@@ -30,18 +30,18 @@
// as being externally visible. (Otherwise, all symbols are hidden by default)
#pragma GCC visibility push(default)
#include "public/colorspace.h"
#include "public/common.h"
#include "public/context.h"
#include "public/dispatch.h"
#include "public/filters.h"
#include "public/ra.h"
#include "public/shaders.h"
#include "public/shaders/colorspace.h"
#include "public/shaders/sampling.h"
#include "include/libplacebo/colorspace.h"
#include "include/libplacebo/common.h"
#include "include/libplacebo/context.h"
#include "include/libplacebo/dispatch.h"
#include "include/libplacebo/filters.h"
#include "include/libplacebo/ra.h"
#include "include/libplacebo/shaders.h"
#include "include/libplacebo/shaders/colorspace.h"
#include "include/libplacebo/shaders/sampling.h"
#if PL_HAVE_VULKAN
#include "public/vulkan.h"
#include "include/libplacebo/vulkan.h"
#endif
#pragma GCC visibility pop
......
......@@ -22,18 +22,6 @@ if (cc.get_id() == 'clang')
endif
# Source files
headers = [
'public/colorspace.h',
'public/common.h',
'public/context.h',
'public/filters.h',
'public/ra.h',
'public/shaders.h',
'public/shaders/colorspace.h',
'public/shaders/sampling.h',
'public/vulkan.h',
]
sources = [
'colorspace.c',
'common.c',
......@@ -138,7 +126,7 @@ lib = library('placebo', sources,
)
# Install process
install_headers(headers, subdir: 'libplacebo')
install_subdir('include/libplacebo', install_dir: get_option('includedir'))
pkg = import('pkgconfig')
pkg.generate(
......
......@@ -20,8 +20,6 @@
#include "../common.h"
#include "../context.h"
#include "public/vulkan.h"
// Vulkan allows the optional use of a custom allocator. We don't need one but
// mark this parameter with a better name in case we ever decide to change this
// in the future. (And to make the code more readable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment