Re: [CMake] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Michael Jackson
Hmm, That works great for MSVC compiles but not so great when I use ninja or makefiles (any of the single config generators). I was looking through the generator expressions on the Cmake doc site but didn't really come across anything that seems like it would get me what is needed. I guess I

Re: [CMake] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Robert Maynard
You can use `file(GENERATE` and the `$` generator expression. Here is an example: https://gitlab.kitware.com/cmake/cmake/blob/v3.12.1/Tests/CudaOnly/ExportPTX/CMakeLists.txt#L13 On Thu, Aug 23, 2018 at 1:47 PM Michael Jackson wrote: > > I would like to copy some files from my source dir into my

[CMake] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Michael Jackson
I would like to copy some files from my source dir into my binary RUNTIME_DIR based on the current configuration being compiled. For generators like “makefiles” and “ninja” this is easy and straight forward. I am having an issue getting my head wrapped around how to use CMAKE_CFG_INTDIR