diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2021-07-11 21:48:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-11 21:48:07 +0200 |
commit | 7059bb2bf8b03837822aa915fb5ec78cfb201a30 (patch) | |
tree | d6a309c1c34ca7945913c8c085f1c1e05a15b732 | |
parent | Merge pull request #6576 from ameerj/unlock-fps-setting (diff) | |
parent | cmake: Only copy pre-commit hook if .git directory exists (diff) | |
download | yuzu-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.txt | 7 |
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 |