mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
cmake: Only copy pre-commit hook if .git directory exists
Allow the usage of git worktrees on yuzu.
This commit is contained in:
parent
5edc96f4a4
commit
849c6db335
1 changed files with 4 additions and 3 deletions
|
@ -47,9 +47,10 @@ if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
|
if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
|
||||||
|
if (EXISTS ${PROJECT_SOURCE_DIR}/.git/)
|
||||||
message(STATUS "Copying pre-commit hook")
|
message(STATUS "Copying pre-commit hook")
|
||||||
file(COPY hooks/pre-commit
|
file(COPY hooks/pre-commit DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
||||||
DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sanity check : Check that all submodules are present
|
# Sanity check : Check that all submodules are present
|
||||||
|
|
Loading…
Reference in a new issue