[CMake] Proper way to set a binary folder inside of the "Debug" folder for Visual Studio

David Cole david.cole at kitware.com
Thu Mar 18 17:09:52 EDT 2010


If "${PROJECT_BINARY_DIR}/bin/plugins" is used in an add_custom_command
context, you can use "${PROJECT_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/plugins"
instead to get what you want. If it's something else besides
add_custom_command, then elaborate with some more details...

${CMAKE_CFG_INTDIR} evaluates to something like "$(OutDir)" for VS,
"$(CONFIGURATION)" for Xcode and "." for makefile generators.


HTH,
David


On Thu, Mar 18, 2010 at 4:39 PM, Mike Jackson
<mike.jackson at bluequartz.net>wrote:

> I am working on some CMake Code where I would like some libraries to
> be placed inside a "plugins" folder in the following path:
>
> ${PROJECT_BINARY_DIR}/bin/plugins.
>
> Works fine with Makefiles. Problem is on Visual Studio. I get my
> executables in ${PROJECT_BINARY_DIR}/bin/Debug/myexe.exe
>  but the plugins get put in
> ${PROJECT_BINARY_DIR}/bin/plugins/myplugin.dll
>
> Working through this in my head I know this is a "Compile" time
> problem and probably can't be solved at "CMake" time because cmake has
> no idea what configuration I am going to build my app in. Would a post
> build step be required for this or something else?
> _________________________________________________________
> Mike Jackson                  mike.jackson at bluequartz.net
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100318/aa65124b/attachment.htm>


More information about the CMake mailing list