Name
Property include_dir — Specify the desired location of a package's exported header files in the install tree.
Synopsis
cdl_package <name> { include_dir <sub-directory> … }
Description
Most packages export one or more header files defining their public
interface. For example the C library exports header files such as
stdio.h
and
ctype.h
.
If the package follows the directory
layout conventions then the exported header files will normally
be found in the package's
include
sub-directory.
Alternatively the include_files property can be used to specify
which header files should be exported.
By default a package's exported header files will be copied to
the include
sub-directory of
the install tree. This is correct for packages like the C library
because that is the correct location for files such as
stdio.h
. However to reduce the
probability of name clashes it is desirable for packages to use
different sub-directories, for example infrastructure header files get
copied to include/cyg/infra
rather than to the top-level
include
directory itself.
It would be possible to replicate these sub-directories in each
package's source tree, such that the infrastructure header file
sources lived in
include/cyg/infra
in the source
tree as well as in the install tree. This would make things more
difficult for the package developers. Instead it is possible to
specify the desired install tree sub-directory using an include_dir
property, for example include_dir cyg/infra
.
The include_dir property can only be used in the body of a cdl_package
command, since it applies to all of the header files
exported by a package, and only one include_dir property can be
used. If there is no include_dir property then exported header files
will end up in the top-level include
directory of the install tree.
Example
cdl_package CYGPKG_INFRA { display "Infrastructure" include_dir cyg/infra description " Common types and useful macros. Tracing and assertion facilities. Package startup options." … }
See Also
Property include_files, and
command cdl_package
.
2024-12-10 | Open Publication License |