summaryrefslogtreecommitdiffstats
path: root/CMakeModules
diff options
context:
space:
mode:
authorliushuyu <liushuyu011@gmail.com>2021-12-24 02:23:02 +0100
committerliushuyu <liushuyu011@gmail.com>2022-07-05 05:21:56 +0200
commit40493231edad7085544b79b6c3ac7360d112170c (patch)
tree5124d6fde6ca6b913c13aca60620c134e3bcf3f1 /CMakeModules
parentCI: use Ninja to build stuff faster (diff)
downloadyuzu-40493231edad7085544b79b6c3ac7360d112170c.tar
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.gz
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.bz2
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.lz
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.xz
yuzu-40493231edad7085544b79b6c3ac7360d112170c.tar.zst
yuzu-40493231edad7085544b79b6c3ac7360d112170c.zip
Diffstat (limited to 'CMakeModules')
-rw-r--r--CMakeModules/CopyYuzuFFmpegDeps.cmake1
-rw-r--r--CMakeModules/MSVCCache.cmake12
2 files changed, 13 insertions, 0 deletions
diff --git a/CMakeModules/CopyYuzuFFmpegDeps.cmake b/CMakeModules/CopyYuzuFFmpegDeps.cmake
index 26384e8b8..f5ab2806c 100644
--- a/CMakeModules/CopyYuzuFFmpegDeps.cmake
+++ b/CMakeModules/CopyYuzuFFmpegDeps.cmake
@@ -2,5 +2,6 @@ function(copy_yuzu_FFmpeg_deps target_dir)
include(WindowsCopyFiles)
set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
file(READ "${FFmpeg_PATH}/requirements.txt" FFmpeg_REQUIRED_DLLS)
+ string(STRIP "${FFmpeg_REQUIRED_DLLS}" FFmpeg_REQUIRED_DLLS)
windows_copy_files(${target_dir} ${FFmpeg_DLL_DIR} ${DLL_DEST} ${FFmpeg_REQUIRED_DLLS})
endfunction(copy_yuzu_FFmpeg_deps)
diff --git a/CMakeModules/MSVCCache.cmake b/CMakeModules/MSVCCache.cmake
new file mode 100644
index 000000000..8848e35ea
--- /dev/null
+++ b/CMakeModules/MSVCCache.cmake
@@ -0,0 +1,12 @@
+# buildcache wrapper
+OPTION(USE_CCACHE "Use buildcache for compilation" OFF)
+IF(USE_CCACHE)
+ FIND_PROGRAM(CCACHE buildcache)
+ IF (CCACHE)
+ MESSAGE(STATUS "Using buildcache found in PATH")
+ SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
+ SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
+ ELSE(CCACHE)
+ MESSAGE(WARNING "USE_CCACHE enabled, but no buildcache executable found")
+ ENDIF(CCACHE)
+ENDIF(USE_CCACHE)