We have a project that builds some executables, then uses those executables to build some additional build artifacts. We have this working well using makefiles on Windows and various unix variants. I decided it would be nice to try doing a build using a Visual Studio project. The various compile/link steps worked great, but any step that needed to use one of the built executables was failing to find the executables. An examination of the build tree revealed that Visual Studio was placing the executables in bin\Debug rather than the expected bin directory.
The command we're using is specified as: add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rexx.img COMMAND ./rexximage DEPENDS rexximage rxapi rexxutil ${image_class_files} ${platform_rexx_img_depends} WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) where we're assuming the rexximage.exe file will be in the CMAKE_RUNTIME_OUTPUT_DIRECTORY, which is specified as ${CMAKE_CURRENT_BINARY_DIR}/bin. Is there a more appropriate method we should be doing to locate this executable that will work using both the NMake build process and a Visual Studio project? Rick
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake