On 12/28/2010 02:39 PM, [email protected] wrote: > Hello > > I'd need to get the filepath of a created executable file, so that i can > use the filepath on a custom command. > > add_executable(Program ...) > > add_custom_command(TARGET Program POST_BUILD COMMAND ${ProgramToRun} > ${Program} ...) > > To clarify, i'd like to run the executable "ProgramToRun" with a command > line argument that is a path to the executable created by add_executable. > > the problem i'm facing is that with visual studio, the path is something > like > > <some_path>/build/Program/debug/Program.exe > > or with release > > <some_path>/build/Program/release/Program.exe > > I have tried messing around with some variables such as: > - RUNTIME_OUTPUT_DIRECTORY > - BUILD_TYPE > Possibly others i can't remember, and undo wont show on my editor for some > odd reason. > > I think there has to be a way, since how would > > INSTALL(TARGETS Program) > > know what files to copy. > > i'd like to get my hands on that very information. > > -mika
This has been addressed in http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0cdb600, but that hasn't made it into any official release yet. Until then, you can use the CMAKE_CFG_INTDIR variable (refer to the docs for the details). Michael _______________________________________________ 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
