Skip to content

Commit 19037e9

Browse files
committed
Add various improvements
- Updated patches. - SELinux 2.0.89 version added to mark some sort of milestone that contains pkg-config. - AppArmor 2.7.0 minimum is requred for aa_getcon(). - Updated documentation of all find modules. - Removed redundant over-paranoid sanity checks from some find modules. - Renamed and synced internal cache variables further.
1 parent b95ea80 commit 19037e9

Some content is hidden

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

52 files changed

+178
-179
lines changed

cmake/cmake/modules/FindACL.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(ACL [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `ACL::ACL` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `ACL_FOUND` - Boolean indicating whether the package is found.
18+
* `ACL_FOUND` - Boolean indicating whether (the requested version of) package
19+
was found.
1920
* `ACL_VERSION` - The version of package found.
2021
2122
## Cache variables

cmake/cmake/modules/FindApache.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ tool, and the `apxs` command-line tool.
1313
1414
## Imported targets
1515
16-
This module defines the following imported targets:
16+
This module provides the following imported targets:
1717
1818
* `Apache::Apache` - The package library, if found.
1919
2020
## Result variables
2121
22-
* `Apache_FOUND` - Boolean indicating whether the package is found.
22+
* `Apache_FOUND` - Boolean indicating whether (the requested version of) package
23+
was found.
2324
* `Apache_VERSION` - The version of package found.
2425
* `Apache_THREADED` - Whether Apache requires thread safety.
2526
* `Apache_LIBEXECDIR` - Path to the directory containing all Apache modules and

cmake/cmake/modules/FindAppArmor.cmake

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(AppArmor [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `AppArmor::AppArmor` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `AppArmor_FOUND` - Boolean indicating whether the package is found.
18+
* `AppArmor_FOUND` - Boolean indicating whether (the requested version of)
19+
package was found.
1920
* `AppArmor_VERSION` - The version of package found.
2021
2122
## Cache variables
@@ -34,8 +35,6 @@ target_link_libraries(example PRIVATE AppArmor::AppArmor)
3435
```
3536
#]=============================================================================]
3637

37-
include(CheckSymbolExists)
38-
include(CMakePushCheckState)
3938
include(FeatureSummary)
4039
include(FindPackageHandleStandardArgs)
4140

@@ -75,21 +74,6 @@ if(NOT AppArmor_LIBRARY)
7574
string(APPEND _reason "AppArmor library not found. ")
7675
endif()
7776

78-
# Sanity check.
79-
if(AppArmor_INCLUDE_DIR AND AppArmor_LIBRARY)
80-
cmake_push_check_state(RESET)
81-
set(CMAKE_REQUIRED_INCLUDES ${AppArmor_INCLUDE_DIR})
82-
set(CMAKE_REQUIRED_LIBRARIES ${AppArmor_LIBRARY})
83-
set(CMAKE_REQUIRED_QUIET TRUE)
84-
85-
check_symbol_exists(aa_change_profile sys/apparmor.h _AppArmor_SANITY_CHECK)
86-
cmake_pop_check_state()
87-
endif()
88-
89-
if(NOT _AppArmor_SANITY_CHECK)
90-
string(APPEND _reason "Sanity check failed: aa_change_profile not found. ")
91-
endif()
92-
9377
# AppArmor headers don't provide version. Try pkg-config.
9478
if(
9579
PC_AppArmor_VERSION
@@ -105,7 +89,6 @@ find_package_handle_standard_args(
10589
REQUIRED_VARS
10690
AppArmor_LIBRARY
10791
AppArmor_INCLUDE_DIR
108-
_AppArmor_SANITY_CHECK
10992
VERSION_VAR AppArmor_VERSION
11093
HANDLE_VERSION_RANGE
11194
REASON_FAILURE_MESSAGE "${_reason}"

cmake/cmake/modules/FindArgon2.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(Argon2 [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `Argon2::Argon2` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `Argon2_FOUND` - Boolean indicating whether the package is found.
18+
* `Argon2_FOUND` - Boolean indicating whether (the requested version of) package
19+
was found.
1920
* `Argon2_VERSION` - The version of package found.
2021
2122
## Cache variables

cmake/cmake/modules/FindAtomic.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ find_package(Atomic)
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `Atomic::Atomic` - The Atomic library, if found.
1515

cmake/cmake/modules/FindBerkeleyDB.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(BerkeleyDB [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `BerkeleyDB::BerkeleyDB` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `BerkeleyDB_FOUND` - Boolean indicating whether the package is found.
18+
* `BerkeleyDB_FOUND` - Boolean indicating whether (the requested version of)
19+
package was found.
1920
* `BerkeleyDB_VERSION` - The version of package found.
2021
2122
## Cache variables
@@ -123,10 +124,10 @@ if(BerkeleyDB_LIBRARY)
123124
(void)db_create((DB**)0, (DB_ENV*)0, 0);
124125
return 0;
125126
}
126-
]] _berkeleydb_sanity_check)
127+
]] BerkeleyDB_SANITY_CHECK)
127128
cmake_pop_check_state()
128129

129-
if(NOT _berkeleydb_sanity_check)
130+
if(NOT BerkeleyDB_SANITY_CHECK)
130131
string(APPEND _reason "Sanity check failed: db_create not found. ")
131132
endif()
132133
endif()
@@ -168,7 +169,7 @@ find_package_handle_standard_args(
168169
REQUIRED_VARS
169170
BerkeleyDB_LIBRARY
170171
BerkeleyDB_INCLUDE_DIR
171-
_berkeleydb_sanity_check
172+
BerkeleyDB_SANITY_CHECK
172173
VERSION_VAR BerkeleyDB_VERSION
173174
HANDLE_VERSION_RANGE
174175
REASON_FAILURE_MESSAGE "${_reason}"

cmake/cmake/modules/FindCapstone.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(Capstone [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `Capstone::Capstone` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `Capstone_FOUND` - Boolean indicating whether the package is found.
18+
* `Capstone_FOUND` - Boolean indicating whether (the requested version of)
19+
package was found.
1920
* `Capstone_VERSION` - The version of package found.
2021
2122
## Cache variables

cmake/cmake/modules/FindCcache.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ find_package(Ccache [<version>] [...])
99
1010
## Result variables
1111
12-
* `Ccache_FOUND` - Boolean indicating whether the package is found.
12+
* `Ccache_FOUND` - Boolean indicating whether (the requested version of) package
13+
was found.
1314
* `Ccache_VERSION` - The version of package found.
1415
1516
## Cache variables

cmake/cmake/modules/FindCclient.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ of the IMAP library that can be found as a standalone package on systems.
1313
1414
## Imported targets
1515
16-
This module defines the following imported targets:
16+
This module provides the following imported targets:
1717
1818
* `Cclient::Cclient` - The package library, if found.
1919
2020
## Result variables
2121
22-
* `Cclient_FOUND` - Boolean indicating whether the package is found.
22+
* `Cclient_FOUND` - Boolean indicating whether the package was found.
2323
* `HAVE_IMAP2000` - Whether c-client version is 2000 or newer. If true,
2424
c-client.h should be included instead of only rfc822.h on prior versions.
2525
* `HAVE_IMAP2001` - Whether c-client version is 2001 to 2004.

cmake/cmake/modules/FindCdb.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ find_package(Cdb [<version>] [...])
99
1010
## Imported targets
1111
12-
This module defines the following imported targets:
12+
This module provides the following imported targets:
1313
1414
* `Cdb::Cdb` - The package library, if found.
1515
1616
## Result variables
1717
18-
* `Cdb_FOUND` - Boolean indicating whether the package is found.
18+
* `Cdb_FOUND` - Boolean indicating whether (the requested version of) package
19+
was found.
1920
* `Cdb_VERSION` - The version of package found.
2021
2122
## Cache variables
@@ -82,10 +83,10 @@ if(Cdb_INCLUDE_DIR AND Cdb_LIBRARY)
8283
set(CMAKE_REQUIRED_LIBRARIES ${Cdb_LIBRARY})
8384
set(CMAKE_REQUIRED_QUIET TRUE)
8485

85-
check_symbol_exists(cdb_read cdb.h _Cdb_SANITY_CHECK)
86+
check_symbol_exists(cdb_read cdb.h Cdb_SANITY_CHECK)
8687
cmake_pop_check_state()
8788

88-
if(NOT _Cdb_SANITY_CHECK)
89+
if(NOT Cdb_SANITY_CHECK)
8990
string(APPEND _reason "Sanity check failed: cdb_read not found. ")
9091
endif()
9192
endif()
@@ -110,7 +111,7 @@ find_package_handle_standard_args(
110111
REQUIRED_VARS
111112
Cdb_LIBRARY
112113
Cdb_INCLUDE_DIR
113-
_Cdb_SANITY_CHECK
114+
Cdb_SANITY_CHECK
114115
VERSION_VAR Cdb_VERSION
115116
HANDLE_VERSION_RANGE
116117
REASON_FAILURE_MESSAGE "${_reason}"

0 commit comments

Comments
 (0)