Warning, /graphics/digikam/core/cmake/macros/MacroGitHeader.cmake is written in an unsupported language. File is not indexed.
0001 # Macro to create git version header 0002 # 0003 # SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com> 0004 # 0005 # SPDX-License-Identifier: BSD-3-Clause 0006 # 0007 0008 macro(GIT_HEADER) 0009 0010 # We only do this IF we are in a .git dir 0011 0012 find_file(GIT_MARKER entries PATHS ${CMAKE_SOURCE_DIR}/.git) 0013 0014 if(NOT GIT_MARKER) 0015 0016 set(GIT_MARKER ${CMAKE_SOURCE_DIR}/CMakeLists.txt) # Dummy file 0017 0018 endif() 0019 0020 # Add a custom command to drive the git script whenever the git entries 0021 # file changes. 0022 0023 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/gitscript.cmake.in" 0024 "${CMAKE_CURRENT_BINARY_DIR}/gitscript.cmake" 0025 @ONLY) 0026 0027 # Add a custom target to drive the custom command. 0028 0029 add_custom_target(digikam-gitversion ALL COMMAND ${CMAKE_COMMAND} -P 0030 "${CMAKE_CURRENT_BINARY_DIR}/gitscript.cmake") 0031 0032 endmacro()