diff --git a/src/actions/make/make_cpp.lua b/src/actions/make/make_cpp.lua index 02e4db71..519e2ada 100644 --- a/src/actions/make/make_cpp.lua +++ b/src/actions/make/make_cpp.lua @@ -354,6 +354,11 @@ if tool then _p(' AR = %s', tool) end + + tool = toolset.gettoolname(cfg, "rc") + if tool then + _p(' RESCOMP = %s', tool) + end end diff --git a/tests/actions/make/cpp/test_tools.lua b/tests/actions/make/cpp/test_tools.lua new file mode 100644 index 00000000..da7acc00 --- /dev/null +++ b/tests/actions/make/cpp/test_tools.lua @@ -0,0 +1,35 @@ +-- +-- tests/actions/make/cpp/test_tools.lua +-- Tests for tools support in makefiles. +-- Copyright (c) 2012-2013 Jason Perkins and the Premake project +-- + + local suite = test.declare("make_tools") + local make = premake.make + local cpp = premake.make.cpp + local project = premake.project + + +-- +-- Setup +-- + + local sln, prj, cfg + + function suite.setup() + sln = test.createsolution() + prj = premake.solution.getproject(sln, 1) + cfg = project.getconfig(prj, "Debug") + end + + +-- +-- Make sure that the correct tools are used. +-- + + function suite.usesCorrectTools() + make.cppTools(cfg, premake.tools.gcc) + test.capture [[ + RESCOMP = windres + ]] + end diff --git a/tests/premake5.lua b/tests/premake5.lua index ffe9af63..7ef08217 100644 --- a/tests/premake5.lua +++ b/tests/premake5.lua @@ -182,6 +182,7 @@ dofile("actions/make/cpp/test_objects.lua") dofile("actions/make/cpp/test_ps3.lua") dofile("actions/make/cpp/test_target_rules.lua") + dofile("actions/make/cpp/test_tools.lua") dofile("actions/make/cpp/test_wiidev.lua") -- Makefile C# projects