fix git-revision.h generation: output to build tree and add missing dependencies
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
Generate git-revision.h into CMAKE_BINARY_DIR/src/ (which is in the include path) instead of the source tree. Remove the header from add_executable() source lists, and add missing add_dependencies on git_revision for all Qt5/Qt6 targets. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -241,16 +241,14 @@ endif ()
|
||||
#--- start create git-revision.h ----------------------------------------------
|
||||
if (IS_GIT_REPO)
|
||||
add_custom_target(git_revision ALL
|
||||
COMMAND sh ${CMAKE_SOURCE_DIR}/src/git_revision.sh
|
||||
COMMAND sh ${CMAKE_SOURCE_DIR}/src/git_revision.sh ${CMAKE_BINARY_DIR}/src
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Checking git revision"
|
||||
)
|
||||
|
||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
||||
set(GIT_REV_H "git-revision.h")
|
||||
else (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "")
|
||||
set(GIT_REV_H "")
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- end create git-revision.h ------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user