FindIcotool
Finds icotool, command-line program for converting and creating Win32 icon and cursor files:
find_package(Icotool [<version>] [...])
Result Variables
This module defines the following variables:
-
Icotool_FOUND -
Added in version 3.3.
Boolean indicating whether (the requested version of)
icotoolwas found. -
Icotool_VERSION -
Added in version 4.2.
The version of
icotoolfound.
Cache Variables
The following cache variables may also be set:
-
ICOTOOL_EXECUTABLE -
The full path to the
icotooltool.
Deprecated Variables
The following variables are provided for backward compatibility:
-
ICOTOOL_FOUND -
Deprecated since version 4.2: Use
Icotool_FOUND, which has the same value.Boolean indicating whether (the requested version of)
icotoolwas found. -
ICOTOOL_VERSION_STRING -
Deprecated since version 4.2: Use
Icotool_VERSION, which has the same value.The version of
icotoolfound.
Examples
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()
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindIcotool.html