dune_add_libraryΒΆ

Add a library to a Dune module!

dune_add_library(
                  SOURCES source1 [source2 ...]
                  basename 
                 [ADD_LIBS add_lib1 [add_lib2 ...]]
                 [NO_EXPORT]
                 [COMPILE_FLAGS compile_flag]
                 [OBJECT]
                 [APPEND]
)
SOURCES
The source files from which to build the library.
basename
The basename for the library. On Unix this created lib<basename>.so and lib<basename>.a
ADD_LIBS
A list of libraries that should be incorporated into this library.
NO_EXPORT
If omitted the library is exported for usage in other modules.
COMPILE_FLAGS
Any additional compile flags for building the library.
OBJECT

Note

This feature will very likely vanish in Dune 3.0

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.