From 2b7daff76f2e1be0f2be9066b0a49dbf08c8c308 Mon Sep 17 00:00:00 2001 From: Helloyunho Date: Thu, 3 Jul 2025 13:11:19 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix:=20don't=20generate=20header?= =?UTF-8?q?=20if=20python=20is=20not=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74fab32e..6167ed54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -529,13 +529,15 @@ if (ISLE_BUILD_APP) ISLE/3ds/config.cpp ) endif() - add_custom_command( - OUTPUT ${CMAKE_SOURCE_DIR}/ISLE/res/arrow_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/busy_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/no_bmp.h - COMMAND ${Python3_EXECUTABLE} tools/png2h.py ISLE/res/arrow.png ISLE/res/busy.png ISLE/res/no.png - DEPENDS ISLE/res/arrow.png ISLE/res/busy.png ISLE/res/no.png - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) - add_custom_target(generate_header ALL DEPENDS ${CMAKE_SOURCE_DIR}/ISLE/res/arrow_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/busy_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/no_bmp.h) + if(Python3_FOUND) + add_custom_command( + OUTPUT ${CMAKE_SOURCE_DIR}/ISLE/res/arrow_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/busy_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/no_bmp.h + COMMAND ${Python3_EXECUTABLE} tools/png2h.py ISLE/res/arrow.png ISLE/res/busy.png ISLE/res/no.png + DEPENDS ISLE/res/arrow.png ISLE/res/busy.png ISLE/res/no.png + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + add_custom_target(generate_header ALL DEPENDS ${CMAKE_SOURCE_DIR}/ISLE/res/arrow_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/busy_bmp.h ${CMAKE_SOURCE_DIR}/ISLE/res/no_bmp.h) + endif() endif() if (ISLE_BUILD_CONFIG)