comparison doc/docs/cmake/MolkoDefineLibrary.md @ 253:c4da052c0def

core: goodbye doxygen
author David Demelier <markand@malikania.fr>
date Thu, 03 Dec 2020 09:06:52 +0100
parents
children 9bbbabb6f077
comparison
equal deleted inserted replaced
252:95c2c4a72410 253:c4da052c0def
1 # molko_define_library
2
3 Create any kind of library.
4
5 ## Synopsis
6
7 ```cmake
8 molko_define_library(
9 TARGET target name
10 SOURCES src1, src2, srcn
11 EXTERNAL (Optional) set to true for external libraries
12 FOLDER (Optional) optional subfolder to organize
13 TYPE (Optional) type of library
14 ASSETS (Optional) list of assets
15 LIBRARIES (Optional) libraries to link
16 PRIVATE_FLAGS (Optional) C flags (without -D)
17 PRIVATE_INCLUDES (Optional) local includes for the target only
18 PUBLIC_FLAGS (Optional) C flags (without -D)
19 PUBLIC_INCLUDES (Optional) includes to share with target dependencies
20 )
21 ```
22
23 Create a library and optionally install it.
24
25 The function create a new library named with the parameter *TARGET*, you
26 should prefix it with "lib" as its the convention within molko (e.g. libfoo),
27 the prefix is automatically removed.
28
29 The argument *SOURCES* should contains the C source files and *HEADERS*
30 should points to a directory to be installed verbatim in the include
31 directory.
32
33 Optional argument *EXTERNAL* should be set for targets that are not
34 maintained here (e.g. third party libraries embedded).
35
36 Optional argument *PRIVATE_FLAGS*, *PUBLIC_FLAGS*, *PRIVATE_INCLUDES*,
37 *PUBLIC_INCLUDES*, *LIBRARIES* may be passed to set compile flags, includes
38 and libraries respectively.
39
40 The arguments *ASSETS* contains a list of assets to be converted during the
41 build. The file hierarchy is conserved in the `${CMAKE_CURRENT_BINARY_DIR}`.
42
43 If *FOLDER* option is set, it is organized into its name under the IDE if
44 supported.
45