[CMake] Forcing CMake to place targets in directories?

Robert Dailey rcdailey at gmail.com
Fri Dec 5 11:33:54 EST 2008


The documentation says:

OUTPUT_NAME sets the real name of a target when it is built and can be used
to help create two targets of the same name even though CMake requires
unique logical target names.

The target being built here seems to be the VCPROJ when using "cmake -G" for
visual studio 2008. Can someone help me understand the purpose of
OUTPUT_NAME if I am mistaken?

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

> Nope. Sorry.
>
> Sent from my iPod
>
> On Dec 4, 2008, at 22:55, "Robert Dailey" <rcdailey at gmail.com> wrote:
>
> 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>
> 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>
>> 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>CMake at cmake.org
>> > <http://www.cmake.org/mailman/listinfo/cmake>
>> http://www.cmake.org/mailman/listinfo/cmake
>> >
>>
>
> _______________________________________________
> 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/20081205/544d24d8/attachment-0001.htm>


More information about the CMake mailing list