diff --git a/32blit-config.cmake b/32blit-config.cmake index 019cfe196..657666c40 100644 --- a/32blit-config.cmake +++ b/32blit-config.cmake @@ -24,7 +24,7 @@ if (NOT DEFINED BLIT_ONCE) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Release") endif() - + if(WIN32) add_definitions("-DWIN32") endif() @@ -36,7 +36,14 @@ if (NOT DEFINED BLIT_ONCE) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) # get the inputs/outputs for the asset tool (at configure time) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -m ttblit --debug cmake --config ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} --output ${CMAKE_CURRENT_BINARY_DIR} --cmake ${CMAKE_CURRENT_BINARY_DIR}/assets.cmake) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -m ttblit --debug cmake --config ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} --output ${CMAKE_CURRENT_BINARY_DIR} --cmake ${CMAKE_CURRENT_BINARY_DIR}/assets.cmake + RESULT_VARIABLE TOOL_RESULT + ) + if(${TOOL_RESULT}) + message(FATAL_ERROR "Reading asset config failed!\n") + endif() + include(${CMAKE_CURRENT_BINARY_DIR}/assets.cmake) # do asset packing (at build time) diff --git a/32blit-sdl/CMakeLists.txt b/32blit-sdl/CMakeLists.txt index d9e6b26d9..373cbcdcd 100644 --- a/32blit-sdl/CMakeLists.txt +++ b/32blit-sdl/CMakeLists.txt @@ -237,7 +237,14 @@ function(blit_metadata TARGET FILE) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${FILE}) # parse the metadata to variables - execute_process(COMMAND ${PYTHON_EXECUTABLE} -m ttblit cmake --config ${FILE} --cmake ${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -m ttblit cmake --config ${FILE} --cmake ${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake + RESULT_VARIABLE TOOL_RESULT + ) + if(${TOOL_RESULT}) + message(FATAL_ERROR "Reading metadata config failed!\n") + endif() + include(${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake) if(APPLE) diff --git a/32blit-stm32/executable.cmake b/32blit-stm32/executable.cmake index a831d0f85..da8ff39bf 100644 --- a/32blit-stm32/executable.cmake +++ b/32blit-stm32/executable.cmake @@ -56,7 +56,14 @@ function(blit_metadata TARGET FILE) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${FILE}) # get the inputs/outputs for the asset tool (at configure time) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -m ttblit cmake --config ${FILE} --cmake ${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -m ttblit cmake --config ${FILE} --cmake ${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake + RESULT_VARIABLE TOOL_RESULT + ) + if(${TOOL_RESULT}) + message(FATAL_ERROR "Reading metadata config failed!\n") + endif() + include(${CMAKE_CURRENT_BINARY_DIR}/metadata.cmake) if(${CMAKE_VERSION} VERSION_LESS "3.15.0")