mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
Where possible this syncs the CS for command names: - check_c_source_compiles() - check_cxx_compiler_flag() - check_cxx_source_compiles() - check_cxx_symbol_exists() - check_include_file_cxx() - check_include_file() - check_include_files() - check_library_exists() - check_source_compiles() - check_struct_has_member() - check_symbol_exists() - check_type_size() - cmake_dependent_option() - cmake_parse_arguments() - feature_summary() - file() - find_package_handle_standard_args() - if(), endif... - install(FILES) - list() - message() - pkg_check_modules() - select_library_configurations() - set_package_info() - test_big_endian()
53 lines
1.3 KiB
CMake
53 lines
1.3 KiB
CMake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
#[=======================================================================[.rst:
|
|
FindIcotool
|
|
-----------
|
|
|
|
Find icotool
|
|
|
|
This module looks for icotool. Convert and create Win32 icon and cursor files.
|
|
This module defines the following values:
|
|
|
|
::
|
|
|
|
ICOTOOL_EXECUTABLE: the full path to the icotool tool.
|
|
ICOTOOL_FOUND: True if icotool has been found.
|
|
ICOTOOL_VERSION_STRING: the version of icotool found.
|
|
#]=======================================================================]
|
|
|
|
find_program(ICOTOOL_EXECUTABLE
|
|
icotool
|
|
)
|
|
|
|
if(ICOTOOL_EXECUTABLE)
|
|
execute_process(
|
|
COMMAND ${ICOTOOL_EXECUTABLE} --version
|
|
OUTPUT_VARIABLE _icotool_version
|
|
ERROR_QUIET
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)")
|
|
set( ICOTOOL_VERSION_STRING
|
|
"${CMAKE_MATCH_1}"
|
|
)
|
|
else()
|
|
set( ICOTOOL_VERSION_STRING
|
|
""
|
|
)
|
|
endif()
|
|
unset(_icotool_version)
|
|
endif()
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
|
find_package_handle_standard_args(
|
|
Icotool
|
|
REQUIRED_VARS ICOTOOL_EXECUTABLE
|
|
VERSION_VAR ICOTOOL_VERSION_STRING
|
|
)
|
|
|
|
mark_as_advanced(
|
|
ICOTOOL_EXECUTABLE
|
|
)
|