From 63b98d959b33741fd3a4f410b367ee47f8b527fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Fri, 18 Jun 2021 12:28:01 -0300 Subject: [PATCH] Error out if tar can't be found. Only applies for platforms other than Windows. --- bitmaps_png/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index 301188a5a7..7ba3680589 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -749,11 +749,15 @@ endfunction() include( FindUnixCommands ) -# CMake on Windows CI seems to struggle to find tar even though it's in PATH -# Let's help it out as modern windows (Server 2019 and 10 provide tar) -if( MSVC AND TAR STREQUAL "TAR-NOTFOUND" ) - # yolo - set( TAR "C:\\Windows\\System32\\tar.exe" ) +if( TAR STREQUAL "TAR-NOTFOUND" ) + # CMake on Windows CI seems to struggle to find tar even though it's in PATH + # Let's help it out as modern windows (Server 2019 and 10 provide tar) + if( MSVC ) + # yolo + set( TAR "C:\\Windows\\System32\\tar.exe" ) + else() + message( FATAL_ERROR "Could not find the tar program." ) + endif() endif() set( BITMAP_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/resources/images.tar.gz )