FindIcotool¶
Finds icotool
, command-line program for converting and creating Win32 icon
and cursor files:
find_package(Icotool [<version>] [...])
結果變數¶
該模組定義了以下變數:
Icotool_FOUND
在 3.3 版被加入.
Boolean indicating whether (the requested version of)
icotool
was found.Icotool_VERSION
在 4.2 版被加入.
The version of
icotool
found.
快取變數¶
The following cache variables may also be set:
ICOTOOL_EXECUTABLE
The full path to the
icotool
tool.
已棄用的變數¶
The following variables are provided for backward compatibility:
ICOTOOL_FOUND
在 4.2 版之後被棄用: Use
Icotool_FOUND
, which has the same value.Boolean indicating whether (the requested version of)
icotool
was found.ICOTOOL_VERSION_STRING
在 4.2 版之後被棄用: Use
Icotool_VERSION
, which has the same value.The version of
icotool
found.
範例¶
Finding icotool
and executing it in a process to create .ico
icon from
the source .png
image located in the current source directory:
find_package(Icotool)
if(Icotool_FOUND)
execute_process(
COMMAND
${ICOTOOL_EXECUTABLE} -c -o ${CMAKE_CURRENT_BINARY_DIR}/img.ico img.png
)
endif()