Re: [CMake] Associating files with command

2010-09-01 Thread Ryan Pavlik
Is there any particular reason why you didn't generate the cpp files to the CMAKE_CURRENT_BINARY_DIR? That's generally the way to go for generated files - writing to the source tree falls under the "big no-no" category. You can create a custom target for the tolua files, with this function -

Re: [CMake] Associating files with command

2010-09-01 Thread Anders Backman
That was very close to what I wanted. But not to 100%, Im not sure if it is possible to get to what I really want: On one hand, I get one build rule for each tolua file, but it was not associated to the actual tolua file. So I cannot do right click->compile on the .pkg file. I can however go furt

Re: [CMake] Associating files with command

2010-08-31 Thread Ryan Pavlik
You were close: here's a function to handle the wrapping - could stick this in the Findtolua.cmake file that you've hopefully made. function wrap_tolua(outvar) set(outfiles) foreach(in ${ARGN}) get_filename_component(inAbs ${in} ABSOLUTE) get_filename_component(basenam

[CMake] Associating files with command

2010-08-31 Thread Anders Backman
Hi all. I have a directory of .pkg files to be processed by tolua. This in turn generates a bunch of cpp files, which I then link into a library. My problem right now is that, I would like to generate a project, where each .pkg is associated with a custom command, so that I in visual studio (for