I'd really like to compile an IDL and embed the resulting typelib.
Currently I have this sort-of-working in CMake generating VS10, but only because VS takes a smart guess and runs midl first and then rc: so far as I can tell the dependencies aren't modelled and if I generate nmake it doesn't work.
Does premake understand midl and rc and know how to wire up the dependencies on generated files?
Thanks
James

It doesn't, but if you can file a feature request and attach a sample project I can probably figure it out.
When you say 'a sample project' - do you mean a makefile?
I think VS essentially guesses that that there may be a relationship that means it has to do any MIDL compilations as the first build step.
Some understanding is needed for the include operations (including the 'typelib' reference) in RC files, and also in IDL files - so this is essentially involving inclusion scanning as well.
>When you say 'a sample project' - do you mean a makefile?
It should be minimal buildable project containing rc and idl and demonstrating your problem
I'm really not trying to be obtuse, but what do you mean 'project'? A 'project' in the terms on Visual Studio, or in terms of premake?
Because:
- the visual studio project will work 'magically' but withut the generatr system knowing the relationships, so being able to generate it does not help since the dependencies aren't modelled (and so any other generated system, such as mingw makefiles) will not work
- and premake appears not to have any support for rc and midl - so how can I create a buildable project? It won't build?
I could provide a Visual Studio project that works 'magically'. And an nmake file that works with the dependencies identified. But if premake doesn't handle rc and midl, I'm not sure what I could provide?
As for me, I call "project" a complete set of source files from which some product (e.g., executable file) could be built, including build system (VS project, makefile, shell script or whatever else). Of course, Premake project is useless here because it doesn't work for you :)
The most valuable part of your project would be rc - I have a little notion of its syntax, however I guess it could be easily parsed in Lua to extract dependencies.
A buildable Visual Studio solution would be great. I just need a working example I can use to figure things out. I haven't done anything with IDL in ages.