diff --git a/CMake/BuildInfo.cmake b/CMake/BuildInfo.cmake index a2017de..f8e7f27 100644 --- a/CMake/BuildInfo.cmake +++ b/CMake/BuildInfo.cmake @@ -18,6 +18,24 @@ if (GIT_FOUND) OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + OUTPUT_VARIABLE GIT_BRANCH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + set(GIT_DEPS "${CMAKE_SOURCE_DIR}/.git/HEAD") + if(GIT_BRANCH AND EXISTS "${CMAKE_SOURCE_DIR}/.git/refs/heads/${GIT_BRANCH}") + list(APPEND GIT_DEPS "${CMAKE_SOURCE_DIR}/.git/refs/heads/${GIT_BRANCH}") + endif() + # Optionnel : index pour les modifications stagées + if(EXISTS "${CMAKE_SOURCE_DIR}/.git/index") + list(APPEND GIT_DEPS "${CMAKE_SOURCE_DIR}/.git/index") + endif() + + # On définit la propriété pour le répertoire source. + set_directory_properties(PROPERTIES CMAKE_CONFIGURE_DEPENDS "${GIT_DEPS}") endif() # Fallback diff --git a/src/Engine/engine/engine.h b/src/Engine/engine/engine.h index 1503457..05f3774 100644 --- a/src/Engine/engine/engine.h +++ b/src/Engine/engine/engine.h @@ -898,7 +898,7 @@ void Engine::initImgui() { ImGui_ImplVulkan_Init(&initInfo); - _mainDeletionQueue.pushFonction([this]() { + _mainDeletionQueue.pushFunction([this, imguiPool]() { ImGui_ImplVulkan_Shutdown(); vkDestroyDescriptorPool( _device,