@@ -9,7 +9,7 @@ Module defines the following `IMPORTED` target(s):
99
1010* `Apache::Apache` - The package library, if found.
1111
12- Result variables:
12+ ## Result variables
1313
1414* `Apache_FOUND` - Whether the package has been found.
1515* `Apache_INCLUDE_DIRS` - Include directories needed to use this package.
@@ -19,7 +19,7 @@ Result variables:
1919* `Apache_LIBEXECDIR` - Path to the directory containing all Apache modules and
2020 `httpd.exp` file (list of exported symbols).
2121
22- Cache variables:
22+ ## Cache variables
2323
2424* `Apache_APXS_EXECUTABLE` - Path to the APache eXtenSion tool command-line tool
2525 (`apxs`).
@@ -34,10 +34,6 @@ Cache variables:
3434* `Apache_INCLUDE_DIR` - Directory containing package library headers.
3535* `Apache_APR_INCLUDE_DIR` - Directory containing `apr` library headers.
3636* `Apache_APR_LIBRARY` - The path to the `apr` library.
37-
38- Hints:
39-
40- The `Apache_ROOT` variable adds custom search path.
4137#]=============================================================================]
4238
4339include (FeatureSummary)
@@ -145,7 +141,7 @@ endif()
145141find_program (
146142 Apache_APR_CONFIG_EXECUTABLE
147143 NAMES apr-config apr-1-config
148- PATHS ${_Apache_APR_BINDIR}
144+ HINTS ${_Apache_APR_BINDIR}
149145 DOC "Path to the apr library command-line tool for retrieving metainformation"
150146)
151147mark_as_advanced (Apache_APR_CONFIG_EXECUTABLE)
@@ -190,8 +186,7 @@ if(Apache_APR_CONFIG_EXECUTABLE)
190186 )
191187endif ()
192188
193- # Find the apr library (Apache portable runtime).
194- # Use pkgconf, if available on the system.
189+ # Try pkg-config.
195190find_package (PkgConfig QUIET )
196191if (PKG_CONFIG_FOUND)
197192 pkg_check_modules(PC_Apache_APR QUIET apr-1)
@@ -200,7 +195,7 @@ endif()
200195find_path (
201196 Apache_APR_INCLUDE_DIR
202197 NAMES apr.h
203- PATHS
198+ HINTS
204199 ${PC_Apache_APR_INCLUDE_DIRS}
205200 ${_Apache_APR_INCLUDE_DIR}
206201 ${_Apache_APU_INCLUDE_DIR}
@@ -215,7 +210,7 @@ endif()
215210find_library (
216211 Apache_APR_LIBRARY
217212 NAMES apr-1
218- PATHS ${PC_Apache_APR_LIBRARY_DIRS}
213+ HINTS ${PC_Apache_APR_LIBRARY_DIRS}
219214 DOC "The path to the apr library"
220215)
221216mark_as_advanced (Apache_APR_LIBRARY)
@@ -231,7 +226,7 @@ endif()
231226find_program (
232227 Apache_APU_CONFIG_EXECUTABLE
233228 NAMES apu-config apu-1-config
234- PATHS ${_Apache_APU_BINDIR}
229+ HINTS ${_Apache_APU_BINDIR}
235230 DOC "Path to the Apache Portable Runtime Utilities config command-line tool"
236231)
237232mark_as_advanced (Apache_APU_CONFIG_EXECUTABLE)
@@ -270,7 +265,7 @@ endif()
270265find_program (
271266 Apache_EXECUTABLE
272267 NAMES ${_Apache_NAME} apache2
273- PATHS ${_Apache_SBINDIR}
268+ HINTS ${_Apache_SBINDIR}
274269 DOC "Path to the Apache HTTP server command-line utility"
275270)
276271mark_as_advanced (Apache_EXECUTABLE)
@@ -283,7 +278,7 @@ find_path(
283278 Apache_INCLUDE_DIR
284279 NAMES httpd.h
285280 PATH_SUFFIXES apache2
286- PATHS ${_Apache_APXS_INCLUDE_DIR}
281+ HINTS ${_Apache_APXS_INCLUDE_DIR}
287282 DOC "Directory containing Apache headers"
288283)
289284mark_as_advanced (Apache_INCLUDE_DIR)
@@ -294,7 +289,7 @@ endif()
294289
295290# Get Apache version.
296291block(PROPAGATE Apache_VERSION)
297- if (Apache_INCLUDE_DIR AND EXISTS ${Apache_INCLUDE_DIR} /ap_release.h)
292+ if (EXISTS ${Apache_INCLUDE_DIR} /ap_release.h)
298293 file (
299294 STRINGS
300295 ${Apache_INCLUDE_DIR} /ap_release.h
@@ -385,6 +380,7 @@ find_package_handle_standard_args(
385380 Apache_APR_INCLUDE_DIR
386381 Apache_EXECUTABLE
387382 VERSION_VAR Apache_VERSION
383+ HANDLE_VERSION_RANGE
388384 REASON_FAILURE_MESSAGE "${_reason} "
389385)
390386
0 commit comments