[CMake] target path, or post build event?

David Cole david.cole at kitware.com
Thu Oct 25 11:21:50 EDT 2007


It will be installed to
"${CMAKE_INSTALL_PREFIX}/copy_file_test/cmaketest.exe" -- you can
re-run CMake and give it the CMAKE_INSTALL_PREFIX value that you'd
like.

On Windows, CMAKE_INSTALL_PREFIX defaults to "%PROGRAMFILES%/Project Name"


On 10/25/07, Mark Wyszomierski <markww at gmail.com> wrote:
> It seems to work, though is moving the file I want to copy into an
> unexpected location. Using the following:
>
> INSTALL(FILES debug/cmaketest.exe DESTINATION copy_file_test)
>
> I'm trying to move the file 'cmaketest.exe' located in a subdirectory
> called 'debug' into another subdirectory called 'copy_file_test'.
>
> The file actually gets copied to:
>
>     C:\Program Files\CMAKETEST\copy_file_test
>
> though. The name of my project is CMakeTest. Any idea?
>
> Thanks,
> Mark
>
>
> On 10/24/07, David Cole <david.cole at kitware.com> wrote:
> > Right click on the INSTALL target and build it.... that will execute the
> > code in Visual Studio to do the installation. (Equivalent to executing "make
> > install" on a make file based system...)
> >
> > HTH,
> > David
> >
> >
> >
> > On 10/24/07, Mark Wyszomierski <markww at gmail.com> wrote:
> > >
> > > Hi Justin,
> > >
> > > Thanks for replying. What runs the INSTALL code - is it executed by
> > > the CMake application when you're done configuring? Or do you manually
> > > run it yourself somehow?
> > >
> > > I tried adding this line to my CMakeLists.txt:
> > >
> > >     INSTALL(FILES debug/cmaketest.exe DESTINATION ../copy_file_test)
> > >
> > >
> > > and I can see that a new solution file (for vc++ 2005) was added named
> > > INSTALL, but it has nothing underneath - not sure what I should be
> > > expecting it to look like?
> > >
> > > Thanks,
> > > Mark
> > >
> > > On 10/24/07, KSpam <keesling_spam at cox.net> wrote:
> > > > Mark,
> > > >
> > > > The build location for libraries can be configured with
> > LIBRARY_OUTPUT_PATH,
> > > > and the build location for executables can be configured with
> > > > EXECUTABLE_OUTPUT_PATH.  I use the following lines in my projects:
> > > >
> > > > SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
> > > > SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
> > > >
> > > > To put your executable and libraries in C:\test, I would suggest using
> > the
> > > > INSTALL command (cmake --help-command INSTALL).  After building, you
> > would
> > > > just need to run the install target to move your executables and
> > libraries
> > > > out of the build directory and into the install directory of choice.
> > The
> > > > install directory is configured with the variable CMAKE_INSTALL_PREFIX.
> > > >
> > > > Justin
> > > >
> > > > On Wednesday 24 October 2007 10:49:37 Mark Wyszomierski wrote:
> > > > > Hi,
> > > > >
> > > > > Is there some way to create an additional target for built binaries?
> > > > > Besides the default location (not sure where that's defined
> > > > > actually...) I'd like to have my projects all dump their build exes or
> > > > > libraries into 'C:\test' for example. Is it possible?
> > > > >
> > > > > Thanks,
> > > > > Mark
> > > > _______________________________________________
> > > > CMake mailing list
> > > > CMake at cmake.org
> > > > http://www.cmake.org/mailman/listinfo/cmake
> > > >
> > > _______________________________________________
> > > CMake mailing list
> > > CMake at cmake.org
> > > http://www.cmake.org/mailman/listinfo/cmake
> > >
> >
> >
>


More information about the CMake mailing list