Re: [CMake] Generate a file with a custom command as part of build

2017-01-24 Thread doug livesey
Is there any way that I can make the files webpack compiles into dependencies for the Webpack task? So that any changes to those are picked up for recompilation? No worries if not, I just thought it would be nice. On 25 January 2017 at 07:19, doug livesey wrote: > Perfect, thankyou so much! > Th

Re: [CMake] Generate a file with a custom command as part of build

2017-01-24 Thread doug livesey
Perfect, thankyou so much! That nailed it! On 24 January 2017 at 20:52, Michael Ellery wrote: > The syntax of your add_custom_target is not quite right…I would try > something more like: > > add_custom_target( Webpack ALL > $WEBPACK > DEPENDS webpack.config.js > BYPRODUCTS public/b

Re: [CMake] Generate a file with a custom command as part of build

2017-01-24 Thread Michael Ellery
The syntax of your add_custom_target is not quite right…I would try something more like: add_custom_target( Webpack ALL $WEBPACK DEPENDS webpack.config.js BYPRODUCTS public/bundle.js ) …that’s untested, of course. I you do that, then I think you don’t need the add_custom_command

Re: [CMake] Generate a file with a custom command as part of build

2017-01-24 Thread doug livesey
Hi -- sorry about the really late reply, I've been away. Up to Hadrian's Wall, and then for a Dark Skies observatory evening. It was ace. :) I've added the following to my CMakeLists.txt file: > set(WEBPACK ${CMAKE_SOURCE_DIR}/node_modules/.bin/webpack) > configure_file(webpack.config.js webpack.c