summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmeer J <52414509+ameerj@users.noreply.github.com>2021-07-11 21:48:07 +0200
committerGitHub <noreply@github.com>2021-07-11 21:48:07 +0200
commit7059bb2bf8b03837822aa915fb5ec78cfb201a30 (patch)
treed6a309c1c34ca7945913c8c085f1c1e05a15b732
parentMerge pull request #6576 from ameerj/unlock-fps-setting (diff)
parentcmake: Only copy pre-commit hook if .git directory exists (diff)
downloadyuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.gz
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.bz2
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.lz
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.xz
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.tar.zst
yuzu-7059bb2bf8b03837822aa915fb5ec78cfb201a30.zip
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b1734f36..716256cd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,9 +47,10 @@ if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
endif()
if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit)
- message(STATUS "Copying pre-commit hook")
- file(COPY hooks/pre-commit
- DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
+ if (EXISTS ${PROJECT_SOURCE_DIR}/.git/)
+ message(STATUS "Copying pre-commit hook")
+ file(COPY hooks/pre-commit DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks)
+ endif()
endif()
# Sanity check : Check that all submodules are present