[CMake] Forcing CMake to place targets in directories?

Robert Dailey rcdailey at gmail.com
Thu Dec 4 22:55:36 EST 2008


I wanted my vcproj files to be placed in "test_projects". Any idea how I can
make this happen?

On Thu, Dec 4, 2008 at 8:30 PM, Mike Jackson <mike.jackson at bluequartz.net>wrote:

> CMAKE_CURRENT_SOURCE_DIR denotes your source tree and NOT the build
> tree. Are you building in your source tree instead of using a
> dedicated build directory?
>
> To answer your code you are setting the output directory of where the
> executable will be placed in a directory called "test_projects" at the
> top level of your build tree.
>
> Mike Jackson
>
>
> On Thu, Dec 4, 2008 at 7:40 PM, Robert Dailey <rcdailey at gmail.com> wrote:
> > Hi,
> >
> > I'm trying to use set_target_properties() to make CMake place generated
> > vcproj files in a subdirectory of ${CMAKE_CURRENT_SOURCE_DIR}. This isn't
> > working and I'm not sure what I'm doing wrong. Below is what I'm doing:
> >
> >             set( test_project_name ${project_name}_test_${test_name} )
> >             project( ${test_project_name} )
> >             source_group( "" ${file} )
> >             add_executable( ${test_project_name} ${file} )
> >             set_target_properties( ${test_project_name} PROPERTIES
> > OUTPUT_NAME test_projects/${test_project_name} )
> >
> > My project should be getting placed inside of a test_projects
> subdirectory,
> > right?
> >
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081204/75451ebe/attachment.htm>


More information about the CMake mailing list