diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-17 06:38:47 +0100 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-17 06:38:47 +0100 | 
| commit | 7bd6993b599bcd3f7b92bb93acbf67c3e0a13f89 (patch) | |
| tree | 6aeea8887b0e763554682b4b9facb2708e43f723 /CMakeLists.txt | |
| parent | 8717f425f46500b76c3e11366c96fd70fc00ab5b (diff) | |
| download | usb-drivers-7bd6993b599bcd3f7b92bb93acbf67c3e0a13f89.tar.gz usb-drivers-7bd6993b599bcd3f7b92bb93acbf67c3e0a13f89.tar.xz usb-drivers-7bd6993b599bcd3f7b92bb93acbf67c3e0a13f89.zip  | |
Bump liberty
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 45 | 
1 files changed, 1 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1caf119..e76cbf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,49 +34,7 @@ endif ()  # Dependencies  set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake) - -# TODO(p): Shove this into IconUtils.cmake. -function (icon_to_iconset_size name svg size iconset outputs) -	math (EXPR _size2x "${size} * 2") -	set (_dimensions "${size}x${size}") -	set (_png1x "${iconset}/icon_${_dimensions}.png") -	set (_png2x "${iconset}/icon_${_dimensions}@2x.png") -	set (${outputs} "${_png1x};${_png2x}" PARENT_SCOPE) - -	set (_find_program_REQUIRE) -	if (NOT ${CMAKE_VERSION} VERSION_LESS 3.18.0) -		set (_find_program_REQUIRE REQUIRED) -	endif () - -	find_program (rsvg_convert_EXECUTABLE rsvg-convert ${_find_program_REQUIRE}) -	add_custom_command (OUTPUT "${_png1x}" "${_png2x}" -		COMMAND ${CMAKE_COMMAND} -E make_directory "${iconset}" -		COMMAND ${rsvg_convert_EXECUTABLE} "--output=${_png1x}" -			"--width=${size}" "--height=${size}" -- "${svg}" -		COMMAND ${rsvg_convert_EXECUTABLE} "--output=${_png2x}" -			"--width=${_size2x}" "--height=${_size2x}" -- "${svg}" -		DEPENDS "${svg}" -		COMMENT "Generating ${name} ${_dimensions} icons" VERBATIM) -endfunction () -function (icon_to_icns svg output_basename output) -	get_filename_component (_name "${output_basename}" NAME_WE) -	set (_iconset "${PROJECT_BINARY_DIR}/${_name}.iconset") -	set (_icon "${PROJECT_BINARY_DIR}/${output_basename}") -	set (${output} "${_icon}" PARENT_SCOPE) - -	set (_icon_png_list) -	foreach (_icon_size 16 32 128 256 512) -		icon_to_iconset_size ("${_name}" "${svg}" -			"${_icon_size}" "${_iconset}" _icon_pngs) -		list (APPEND _icon_png_list ${_icon_pngs}) -	endforeach () -	add_custom_command (OUTPUT "${_icon}" -		COMMAND iconutil -c icns -o "${_icon}" "${_iconset}" -		DEPENDS ${_icon_png_list} -		COMMENT "Generating ${_name} icon" VERBATIM) -	set_source_files_properties ("${_icon}" PROPERTIES -		MACOSX_PACKAGE_LOCATION Resources) -endfunction () +include (IconUtils)  find_package (PkgConfig REQUIRED)  pkg_check_modules (libusb libusb-1.0) @@ -138,7 +96,6 @@ endif ()  if (WITH_HIDAPI AND WIN32)  	list (APPEND targets_gui eizoctltray) -	include (IconUtils)  	set (icon_png_list)  	foreach (icon_size 16 32 48)  		icon_to_png (eizoctltray ${PROJECT_SOURCE_DIR}/eizoctltray.svg  | 
