>> I'm using CMake, MinGW and Eclipse as described here >> http://www.cmake.org/Wiki/Eclipse_CDT4_Generator. In my project I >> need to compile a resource file, so I've used the >> add_custom_command() to achieve this. If I run make in MSYS it >> succeeds, but running from Eclipse causes a problem, since Eclipse >> cannot find windres.exe. How can I automatically provide a path to >> windres.exe during the project generation or are there any other >> solutions? > Use the "find_program" command to find the full path to windres, then > use the result of that statement rather than just the hardcoded > "windres" as the executable for your custom command.
find_program() still requires some valid PATH to search. If I manually add PATH=c:\mingw\bin to Eclipse environment variables, the windres.exe could be found without any problems. The best way where to let CMake specify RC compiler path during generator creation using cmake-gui. What about applying this patch: http://public.kitware.com/Bug/view.php?id=4068 Regards, Yegor _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake