Skip to content

Commit dfc32b5

Browse files
committed
Update docs of find modules
1 parent 2d214af commit dfc32b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+561
-190
lines changed

cmake/cmake/modules/FindACL.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindACL
33
4-
Find the ACL library.
4+
Finds the ACL library:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(ACL)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `ACL::ACL` - The package library, if found.
915
@@ -27,11 +33,14 @@ Module defines the following `IMPORTED` target(s):
2733
check if the ACL library supports `ACL_USER` and `ACL_GROUP`. For example,
2834
macOS doesn't have support for user/group.
2935
30-
## Usage
36+
## Examples
37+
38+
Basic usage:
3139
3240
```cmake
3341
# CMakeLists.txt
3442
find_package(ACL)
43+
target_link_libraries(example PRIVATE ACL::ACL)
3544
```
3645
#]=============================================================================]
3746

cmake/cmake/modules/FindApache.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#[=============================================================================[
22
# FindApache
33
4-
Find the Apache packages and tools.
4+
Finds the Apache packages and tools:
5+
6+
```cmake
7+
find_package(Apache)
8+
```
59
610
The Apache development package usually contains Apache header files, the `apr`
711
(Apache Portable Runtime) library and its headers, `apr` config command-line
812
tool, and the `apxs` command-line tool.
913
10-
Module defines the following `IMPORTED` target(s):
14+
## Imported targets
15+
16+
This module defines the following imported targets:
1117
1218
* `Apache::Apache` - The package library, if found.
1319
@@ -37,11 +43,14 @@ Module defines the following `IMPORTED` target(s):
3743
* `Apache_APR_INCLUDE_DIR` - Directory containing `apr` library headers.
3844
* `Apache_APR_LIBRARY` - The path to the `apr` library.
3945
40-
## Usage
46+
## Examples
47+
48+
Basic usage:
4149
4250
```cmake
4351
# CMakeLists.txt
4452
find_package(Apache)
53+
target_link_libraries(example PRIVATE Apache::Apache)
4554
```
4655
#]=============================================================================]
4756

cmake/cmake/modules/FindAppArmor.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindAppArmor
33
4-
Find the AppArmor library.
4+
Finds the AppArmor library:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(AppArmor)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `AppArmor::AppArmor` - The package library, if found.
915
@@ -19,11 +25,14 @@ Module defines the following `IMPORTED` target(s):
1925
* `AppArmor_INCLUDE_DIR` - Directory containing package library headers.
2026
* `AppArmor_LIBRARY` - The path to the package library.
2127
22-
## Usage
28+
## Examples
29+
30+
Basic usage:
2331
2432
```cmake
2533
# CMakeLists.txt
2634
find_package(AppArmor)
35+
target_link_libraries(example PRIVATE AppArmor::AppArmor)
2736
```
2837
#]=============================================================================]
2938

cmake/cmake/modules/FindArgon2.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindArgon2
33
4-
Find the Argon2 library.
4+
Finds the Argon2 library:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(Argon2)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `Argon2::Argon2` - The package library, if found.
915
@@ -19,11 +25,14 @@ Module defines the following `IMPORTED` target(s):
1925
* `Argon2_INCLUDE_DIR` - Directory containing package library headers.
2026
* `Argon2_LIBRARY` - The path to the package library.
2127
22-
## Usage
28+
## Examples
29+
30+
Basic usage:
2331
2432
```cmake
2533
# CMakeLists.txt
2634
find_package(Argon2)
35+
target_link_libraries(example PRIVATE Argon2::Argon2)
2736
```
2837
#]=============================================================================]
2938

cmake/cmake/modules/FindAtomic.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindAtomic
33
4-
Find the atomic instructions.
4+
Finds the atomic instructions:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(Atomic)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `Atomic::Atomic` - The Atomic library, if found.
915
@@ -13,11 +19,14 @@ Module defines the following `IMPORTED` target(s):
1319
* `Atomic_LIBRARIES` - A list of libraries needed in order to use atomic
1420
functionality.
1521
16-
## Usage
22+
## Examples
23+
24+
Basic usage:
1725
1826
```cmake
1927
# CMakeLists.txt
2028
find_package(Atomic)
29+
target_link_libraries(example PRIVATE Atomic::Atomic)
2130
```
2231
#]=============================================================================]
2332

cmake/cmake/modules/FindBISON.cmake

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
#[=============================================================================[
22
# FindBISON
33
4-
Find `bison`, the general-purpose parser generator, command-line executable.
4+
This module extends the upstream CMake `FindBISON` module with few
5+
customizations.
56
6-
This module extends the CMake `FindBISON` module.
77
See: https://cmake.org/cmake/help/latest/module/FindBISON.html
8-
9-
## Usage
10-
11-
```cmake
12-
# CMakeLists.txt
13-
find_package(BISON)
14-
```
158
#]=============================================================================]
169

1710
include(FeatureSummary)

cmake/cmake/modules/FindBerkeleyDB.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindBerkeleyDB
33
4-
Find the Berkeley DB library.
4+
Finds the Berkeley DB library:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(BerkeleyDB)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `BerkeleyDB::BerkeleyDB` - The package library, if found.
915
@@ -26,11 +32,14 @@ Module defines the following `IMPORTED` target(s):
2632
* Set `BerkeleyDB_USE_DB1` to `TRUE` before calling `find_package(BerkeleyDB)`
2733
to enable the Berkeley DB 1.x support/emulation.
2834
29-
## Usage
35+
## Examples
36+
37+
Basic usage:
3038
3139
```cmake
3240
# CMakeLists.txt
3341
find_package(BerkeleyDB)
42+
target_link_libraries(example PRIVATE BerkeleyDB::BerkeleyDB)
3443
```
3544
#]=============================================================================]
3645

cmake/cmake/modules/FindCapstone.cmake

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#[=============================================================================[
22
# FindCapstone
33
4-
Find the Capstone library.
4+
Finds the Capstone library:
55
6-
Module defines the following `IMPORTED` target(s):
6+
```cmake
7+
find_package(Capstone)
8+
```
9+
10+
## Imported targets
11+
12+
This module defines the following imported targets:
713
814
* `Capstone::Capstone` - The package library, if found.
915
@@ -19,11 +25,14 @@ Module defines the following `IMPORTED` target(s):
1925
* `Capstone_INCLUDE_DIR` - Directory containing package library headers.
2026
* `Capstone_LIBRARY` - The path to the package library.
2127
22-
## Usage
28+
## Examples
29+
30+
Basic usage:
2331
2432
```cmake
2533
# CMakeLists.txt
2634
find_package(Capstone)
35+
target_link_libraries(example PRIVATE Capstone::Capstone)
2736
```
2837
#]=============================================================================]
2938

cmake/cmake/modules/FindCcache.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#[=============================================================================[
22
# FindCcache
33
4-
Find the Ccache compiler cache tool for faster compilation times.
4+
Finds the Ccache compiler cache tool for faster compilation times:
5+
6+
```cmake
7+
find_package(Ccache)
8+
```
59
610
## Result variables
711
@@ -17,7 +21,9 @@ Find the Ccache compiler cache tool for faster compilation times.
1721
* The `CCACHE_DISABLE` regular or environment variable which disables ccache and
1822
doesn't adjust the C and CXX launcher. For more info see Ccache documentation.
1923
20-
## Usage
24+
## Examples
25+
26+
Basic usage:
2127
2228
```cmake
2329
# CMakeLists.txt

cmake/cmake/modules/FindCclient.cmake

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#[=============================================================================[
22
# FindCclient
33
4-
Find the IMAP c-client library.
4+
Finds the IMAP c-client library:
5+
6+
```cmake
7+
find_package(Cclient)
8+
```
59
610
Also called UW-IMAP library was once maintained by the Washington University.
711
Today it is obsolete and its usage is discouraged. The c-client is a component
812
of the IMAP library that can be found as a standalone package on systems.
913
10-
Module defines the following `IMPORTED` target(s):
14+
## Imported targets
15+
16+
This module defines the following imported targets:
1117
1218
* `Cclient::Cclient` - The package library, if found.
1319
@@ -61,6 +67,15 @@ cclient_check_symbol_exists(<symbol> <header> <result>)
6167
* `<symbol>` - Symbol name to check if it is available in the c-client.
6268
* `<header>` - Header file to include.
6369
* `<result>` - Cache variable name for storing the check result.
70+
71+
## Examples
72+
73+
Basic usage:
74+
75+
```cmake
76+
find_package(Cclient)
77+
target_link_libraries(example PRIVATE Cclient::Cclient)
78+
```
6479
#]=============================================================================]
6580

6681
include(CheckSourceCompiles)

0 commit comments

Comments
 (0)