dune_add_libraryΒΆ

Add a library to a Dune module!

dune_add_library(
     basename 
     SOURCES source1 [source2 ...]
    [NO_EXPORT]
    [ADD_LIBS add_lib1 [add_lib2 ...]]
    [APPEND]
    [OBJECT]
    [COMPILE_FLAGS compile_flag]
)
basename

The basename for the library. On Unix this created lib<basename>.so and lib<basename>.a

SOURCES

The source files from which to build the library.

NO_EXPORT

If omitted the library is exported for usage in other modules.

ADD_LIBS

A list of libraries that should be incorporated into this library.

APPEND

Whether the library should be appended to the exported libraries. If there a DUNE module must make several libraries available, then first one must not use this option but the others have to use it. Otherwise only the last library will be exported as the others will be overwritten.

OBJECT

Note

This feature will very likely vanish in Dune 3.0

COMPILE_FLAGS

Any additional compile flags for building the library.