premake-ninja icon indicating copy to clipboard operation
premake-ninja copied to clipboard

fix for `targetextension` config option

Open p0358 opened this issue 2 years ago • 3 comments

With Premake you can specify the option to change target file's extension like this: targetextension ".aes"

This would cause the check I fixed to fail, as the extension isn't .dll. Not sure if my fix for this is perfect, but I don't think MSVC can build non-Windows libraries, so it should be fine?

This fails the gcc test though, but honestly I don't have any better ideas for now. But for now better to partially fix than not at all, unless you have any better ideas...

p0358 avatar Jul 04 '23 04:07 p0358

Unclear what you expect to happens with targetextension ".aes"... I agree that current test for extra files is not ideal for now...

Jarod42 avatar Jul 07 '23 14:07 Jarod42

It should simply override the output file's extension from the default exe and dll, it's supported by core, and in my case I'm compiling a replacement DLL where someone originally for some reason decided to just rename the extension from .dll to .aes (it doesn't make much sense, but there is such option and Windows has no issues with that either)

p0358 avatar Jul 07 '23 15:07 p0358

Should be fixed by https://github.com/jimon/premake-ninja/commit/3077d4767ec4d4db22b362f546038e952346948a

using os.target() == "windows" for dll/lib stuff.

Jarod42 avatar Jul 13 '23 12:07 Jarod42