Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt1
-rw-r--r--src/actions/make/make_cpp.lua12
-rw-r--r--tests/test_gmake_cpp.lua8
3 files changed, 19 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index f54a99b..db18f71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -50,6 +50,7 @@
* Patch 3428348: Add .gitignore file (Konstantin Tokarev)
* Patch 3430158: Reorder LINKCMD for Gmake (rjmyst3)
* Patch 3451212: Fix Visual Studio MFC with StaticRuntime
+* Patch 3463020: Add windres environment variable for makefiles (icebreaker)
-------
diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua
index 78bcaec..4d09d1d 100644
--- a/src/actions/make/make_cpp.lua
+++ b/src/actions/make/make_cpp.lua
@@ -118,7 +118,7 @@
elseif (path.getextension(file) == ".rc") then
_p('$(OBJDIR)/%s.res: %s', _MAKE.esc(path.getbasename(file)), _MAKE.esc(file))
_p('\t@echo $(notdir $<)')
- _p('\t$(SILENT) windres $< -O coff -o "$@" $(RESFLAGS)')
+ _p('\t$(SILENT) $(RESCOMP) $< -O coff -o "$@" $(RESFLAGS)')
end
end
_p('')
@@ -161,9 +161,17 @@
_p(' AR = %s', cc.ar)
_p('endif')
_p('')
+
+ _p('ifndef RESCOMP')
+ _p(' ifdef WINDRES')
+ _p(' RESCOMP = $(WINDRES)')
+ _p(' else')
+ _p(' RESCOMP = windres')
+ _p(' endif')
+ _p('endif')
+ _p('')
end
-
--
-- Write a block of configuration settings.
--
diff --git a/tests/test_gmake_cpp.lua b/tests/test_gmake_cpp.lua
index 529a6da..3670e28 100644
--- a/tests/test_gmake_cpp.lua
+++ b/tests/test_gmake_cpp.lua
@@ -58,6 +58,14 @@ endif
ifndef AR
AR = ar
endif
+
+ifndef RESCOMP
+ ifdef WINDRES
+ RESCOMP = $(WINDRES)
+ else
+ RESCOMP = windres
+ endif
+endif
]]
end