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

Michael Wild themiwi at gmail.com
Thu Mar 18 17:09:09 EDT 2010


CMAKE_CFG_INTDIR is what you want. It expands to a variable reference which gets expanded at build-time by the respective multi-config IDE (i.e. Debug, Release, etc.)

Michael

On 18. Mar, 2010, at 21:39 , Mike Jackson 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



More information about the CMake mailing list