FindWget¶
This module finds the wget
command-line tool for retrieving content from web
servers:
find_package(Wget [...])
結果變數¶
該模組定義了以下變數:
Wget_FOUND
在 3.3 版被加入.
Boolean indicating whether
wget
was found.
快取變數¶
The following cache variables may also be set:
WGET_EXECUTABLE
The full path to the
wget
tool.
已棄用的變數¶
The following variables are provided for backward compatibility:
WGET_FOUND
在 4.2 版之後被棄用: Use
Wget_FOUND
, which has the same value.Boolean indicating whether
wget
was found.
範例¶
Finding wget
and executing it in a process:
find_package(Wget)
if(Wget_FOUND)
execute_process(COMMAND ${WGET_EXECUTABLE} -h)
endif()
另請參見¶
The
file(DOWNLOAD)
command to download the given URL to a local file.