[CMake] Forcing CMake to place targets in directories?

Mike Jackson mike.jackson at bluequartz.net
Thu Dec 4 21:30:33 EST 2008


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
>


More information about the CMake mailing list