aboutsummaryrefslogtreecommitdiff
path: root/src/cached.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-10 15:09:13 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-10 15:09:13 +0200
commitcc73e06a46cbefd2afa4caa7ef95ba6d9ab64eb9 (patch)
treeab8582b26760c023d37d525f355046aacf93944f /src/cached.cpp
parent8dc4eca4d2940500de30dfb8fd2ec25f7c31eba7 (diff)
Allow precompiled resources with -resource:foo.res
And add them to the magic new feature.
Diffstat (limited to 'src/cached.cpp')
-rw-r--r--src/cached.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cached.cpp b/src/cached.cpp
index 02cb1ae96..36927496d 100644
--- a/src/cached.cpp
+++ b/src/cached.cpp
@@ -200,6 +200,17 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
}
}
+ // Add Windows resource file to file list, if applicable
+ if (build_context.has_resource) {
+ String res_path = {};
+ if (build_context.build_paths[BuildPath_RC].basename == "") {
+ res_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_RES]);
+ } else {
+ res_path = path_to_string(heap_allocator(), build_context.build_paths[BuildPath_RC]);
+ }
+ array_add(&files, res_path);
+ }
+
for (auto const &entry : c->info.load_file_cache) {
auto *cache = entry.value;
if (!cache || !cache->exists) {