Fix up maintain_pngs a little for msvc/windows

This commit is contained in:
Marek Roszko 2022-01-23 08:47:12 -05:00
parent 92155f5262
commit 34b68bad02
1 changed files with 12 additions and 4 deletions

View File

@ -641,7 +641,7 @@ set( TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" )
# true to generate log files, false to build icon files only
# generate logs is useful only if you have problems
set( CREATE_LOG_FILES true )
set( CREATE_LOG_FILES false )
set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h" )
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h.in" )
@ -654,9 +654,13 @@ function( svg2png inputFile outFile pngWidth pngHeight )
if( CREATE_LOG_FILES )
set( logfile "${TMP_DIR}/${bmn}.inkscape.log" )
else()
if( MSVC )
set( logfile "nul" )
else()
set( logfile "null" )
endif()
endif()
if( ${pngWidth} EQUAL -1 )
set( sizeArgs --export-area-page )
@ -686,9 +690,13 @@ function( png2png inputFile outFile )
if( CREATE_LOG_FILES )
set( logfile "${TMP_DIR}/${bmn}.pngcrush.log" )
else()
if( MSVC )
set( logfile "nul" )
else()
set( logfile "null" )
endif()
endif()
add_custom_command(
OUTPUT ${outFile}
@ -825,7 +833,7 @@ if( MAINTAIN_PNGS )
if( NOT Inkscape_FOUND )
find_program( Inkscape_EXECUTABLE inkscape
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Inkscape;InstallDir]"
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Inkscape;InstallDir]" "$ENV{PROGRAMFILES}\\Inkscape\\bin"
DOC "Inkscape vector drawing program." )
if( NOT Inkscape_EXECUTABLE )