FindWget
This module finds the wget command-line tool for retrieving content from web servers:
find_package(Wget [...])
Result Variables
This module defines the following variables:
-
Wget_FOUND -
Added in version 3.3.
Boolean indicating whether
wgetwas found.
Cache Variables
The following cache variables may also be set:
-
WGET_EXECUTABLE -
The full path to the
wgettool.
Deprecated Variables
The following variables are provided for backward compatibility:
-
WGET_FOUND -
Deprecated since version 4.2: Use
Wget_FOUND, which has the same value.Boolean indicating whether
wgetwas found.
Examples
Finding wget and executing it in a process:
find_package(Wget)
if(Wget_FOUND)
execute_process(COMMAND ${WGET_EXECUTABLE} -h)
endif()
See Also
- The
file(DOWNLOAD)command to download the given URL to a local file.
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindWget.html