From 8c123337a2682c4a681dc6124a73f53e11c74059 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Thu, 21 Feb 2013 10:22:40 -0500 Subject: Fix .def file support for VS2010 (Riccardo Ghetta) --- CHANGES.txt | 1 + src/actions/vstudio/vs2010_vcxproj.lua | 6 ++++++ tests/actions/vstudio/vc2010/test_link_settings.lua | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 2701c36..f0e8937 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -69,6 +69,7 @@ * Allow command line override of makefile flags (Cameron Hart) * Fix linking to external libraries outside of project folder * Improve processing of ld.so.conf (Cameron Hart) +* Patch 154: Fix .def file support for VS2010 (Riccardo Ghetta) ------- diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index cf62c51..0b758d8 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -403,6 +403,12 @@ end import_lib(cfg) + + local deffile = premake.findfile(cfg, ".def") + if deffile then + _p(3,'%s', deffile) + end + link_target_machine(3,cfg) additional_options(3,cfg) end diff --git a/tests/actions/vstudio/vc2010/test_link_settings.lua b/tests/actions/vstudio/vc2010/test_link_settings.lua index 46f02b2..c33345b 100644 --- a/tests/actions/vstudio/vc2010/test_link_settings.lua +++ b/tests/actions/vstudio/vc2010/test_link_settings.lua @@ -208,3 +208,22 @@ ]] end + + +-- +-- Correctly handle module definition (.def) files. +-- + + function suite.recognizesModuleDefinitionFile() + files { "hello.cpp", "hello.def" } + prepare() + test.capture [[ + + Console + false + $(OutDir)MyProject.exe + mainCRTStartup + hello.def + + ]] + end -- cgit v1.2.3