瀏覽代碼

#if WINDOWS

Jeroen van Rijn 1 年之前
父節點
當前提交
4148c6d6c7
共有 1 個文件被更改,包括 10 次插入9 次删除
  1. 10 9
      src/cached.cpp

+ 10 - 9
src/cached.cpp

@@ -200,16 +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]);
+	#if defined(GB_SYSTEM_WINDOWS)
+		if (build_context.has_resource) {
+			String res_path = {};
+			if (build_context.build_paths[BuildPath_RC].basename == "")  {
+				res_path = path_to_string(permanent_allocator(), build_context.build_paths[BuildPath_RES]);
+			} else {
+				res_path = path_to_string(permanent_allocator(), build_context.build_paths[BuildPath_RC]);
+			}
+			array_add(&files, res_path);
 		}
-		array_add(&files, res_path);
-	}
+	#endif
 
 	for (auto const &entry : c->info.load_file_cache) {
 		auto *cache = entry.value;