summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-25 08:11:45 +0200
committerGitHub <noreply@github.com>2022-09-25 08:11:45 +0200
commit465c46387d38c9fd0c14ad856fb22edb7c2858d7 (patch)
tree94553da8e7ea7c94db602451a11535b900099c36 /src/common
parentMerge pull request #8941 from Kelebek1/single_core_sucks (diff)
parentcmake: fix git detection (diff)
downloadyuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar.gz
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar.bz2
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar.lz
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar.xz
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.tar.zst
yuzu-465c46387d38c9fd0c14ad856fb22edb7c2858d7.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 68436a4bc..3447fabd8 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -14,32 +14,7 @@ if (DEFINED ENV{DISPLAYVERSION})
set(DISPLAY_VERSION $ENV{DISPLAYVERSION})
endif ()
-# Pass the path to git to the GenerateSCMRev.cmake as well
-find_package(Git QUIET)
-
-add_custom_command(OUTPUT scm_rev.cpp
- COMMAND ${CMAKE_COMMAND}
- -DSRC_DIR=${PROJECT_SOURCE_DIR}
- -DBUILD_REPOSITORY=${BUILD_REPOSITORY}
- -DTITLE_BAR_FORMAT_IDLE=${TITLE_BAR_FORMAT_IDLE}
- -DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING}
- -DBUILD_TAG=${BUILD_TAG}
- -DBUILD_ID=${DISPLAY_VERSION}
- -DGIT_REF_SPEC=${GIT_REF_SPEC}
- -DGIT_REV=${GIT_REV}
- -DGIT_DESC=${GIT_DESC}
- -DGIT_BRANCH=${GIT_BRANCH}
- -DBUILD_FULLNAME=${BUILD_FULLNAME}
- -DGIT_EXECUTABLE=${GIT_EXECUTABLE}
- -P ${PROJECT_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake
- DEPENDS
- # Check that the scm_rev files haven't changed
- "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in"
- "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.h"
- # technically we should regenerate if the git version changed, but its not worth the effort imo
- "${PROJECT_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
- VERBATIM
-)
+include(GenerateSCMRev)
add_library(common STATIC
algorithm.h
@@ -117,7 +92,7 @@ add_library(common STATIC
quaternion.h
reader_writer_queue.h
ring_buffer.h
- scm_rev.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/scm_rev.cpp
scm_rev.h
scope_exit.h
settings.cpp