Bump liberty
This commit is contained in:
parent
ef257cd575
commit
f8ea1634c4
2
liberty
2
liberty
@ -1 +1 @@
|
||||
Subproject commit 62166f9679f583f1ea6028bfe54a4487ccc57df0
|
||||
Subproject commit 969a4cfc3ea1c4d7c0327907385fc64906ed5d4c
|
@ -24,42 +24,11 @@ set (project_config ${PROJECT_BINARY_DIR}/config.h)
|
||||
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${project_config})
|
||||
include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
|
||||
|
||||
# Icon generation utilities
|
||||
# TODO: Shove this into liberty as a CMake module, similar to AddThreads,
|
||||
# and remove the copies in the parent CMakeLists.txt as well as in tdv.
|
||||
# Produce a beep sample
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.18.0)
|
||||
set (find_program_REQUIRE REQUIRED)
|
||||
endif ()
|
||||
|
||||
function (icon_to_png name svg size output_dir output)
|
||||
set (_dimensions ${size}x${size})
|
||||
set (_png_path ${output_dir}/hicolor/${_dimensions}/apps)
|
||||
set (_png ${_png_path}/${name}.png)
|
||||
set (${output} ${_png} PARENT_SCOPE)
|
||||
|
||||
find_program (rsvg_convert_EXECUTABLE rsvg-convert ${find_program_REQUIRE})
|
||||
add_custom_command (OUTPUT ${_png}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${_png_path}
|
||||
COMMAND ${rsvg_convert_EXECUTABLE} --output=${_png}
|
||||
--width=${size} --height=${size} ${svg}
|
||||
DEPENDS ${svg}
|
||||
COMMENT "Generating ${name} ${_dimensions} application icon" VERBATIM)
|
||||
endfunction ()
|
||||
|
||||
function (icon_for_win32 ico pngs pngs_raw)
|
||||
set (_raws)
|
||||
foreach (png ${pngs_raw})
|
||||
list (APPEND _raws "--raw=${png}")
|
||||
endforeach ()
|
||||
|
||||
find_program (icotool_EXECUTABLE icotool ${find_program_REQUIRE})
|
||||
add_custom_command (OUTPUT ${ico}
|
||||
COMMAND ${icotool_EXECUTABLE} -c -o ${ico} ${_raws} -- ${pngs}
|
||||
DEPENDS ${pngs} ${pngs_raw}
|
||||
COMMENT "Generating Windows program icon" VERBATIM)
|
||||
endfunction ()
|
||||
|
||||
# Produce a beep sample
|
||||
find_program (sox_EXECUTABLE sox ${find_program_REQUIRE})
|
||||
add_custom_command (OUTPUT beep.wav
|
||||
COMMAND ${sox_EXECUTABLE} -b 16 -Dr 44100 -n beep.wav
|
||||
@ -67,6 +36,10 @@ add_custom_command (OUTPUT beep.wav
|
||||
COMMENT "Generating a beep sample" VERBATIM)
|
||||
|
||||
# Rasterize SVG icons
|
||||
set (root "${PROJECT_SOURCE_DIR}/..")
|
||||
set (CMAKE_MODULE_PATH ${root}/liberty/cmake)
|
||||
include (IconUtils)
|
||||
|
||||
set (icon_ico_list)
|
||||
foreach (icon xW xW-highlighted)
|
||||
set (icon_png_list)
|
||||
@ -87,8 +60,6 @@ set_property (SOURCE xW.rc
|
||||
APPEND PROPERTY OBJECT_DEPENDS ${icon_ico_list} beep.wav)
|
||||
|
||||
# Build the main executable and link it
|
||||
set (root "${PROJECT_SOURCE_DIR}/..")
|
||||
|
||||
find_program (awk_EXECUTABLE awk ${find_program_REQUIRE})
|
||||
add_custom_command (OUTPUT xC-proto.cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E env LC_ALL=C ${awk_EXECUTABLE}
|
||||
|
Loading…
Reference in New Issue
Block a user