[Cmake] VC++ 7.1 Post Build Problem

Marco Spatz marco.spatz at icido.de
Fri Sep 17 07:43:48 EDT 2004


Hi,

we are currently using cmake 1.8.3 and VS 7.0 to build our system, but 
we are going to switch to cmake 2.0.3 and VC++ 7.1. I am the first one 
to take that step, and cmake 2.0.3 now works fine, but I still got 
problems with my new VC++ 7.1. After the build, we want to copy the 
needed dlls into the directory the binary's in. Therefore we use the 
code below to generate a post build command in VC++.

FOREACH (file
             cg.dll
             OgreMain.dll
             OgreMain_d.dll
             devil.dll
             ilu.dll
             ilut.dll
             OgrePlatform.dll
             Plugin_BSPSceneManager.dll
             Plugin_CgProgramManager.dll
             Plugin_FileSystem.dll
             Plugin_GuiElements.dll
             Plugin_NatureSceneManager.dll
             Plugin_OctreeSceneManager.dll
             Plugin_ParticleFX.dll
             ReferenceAppLayer.dll
             RenderSystem_Direct3D7.dll
             RenderSystem_Direct3D9.dll
             RenderSystem_GL.dll
             )

            ADD_CUSTOM_COMMAND(TARGET libIDOOgreRenderer POST_BUILD
                COMMAND ${CMAKE_COMMAND} ARGS -E copy 
${PROJECT_SOURCE_DIR}/extern/ogre/lib/win32/${CMAKE_CFG_INTDIR}/${file}
                ${PROJECT_SOURCE_DIR}/bin/win32/${CMAKE_CFG_INTDIR})
    ENDFOREACH (file)   

With VS 7.0 this works fine, but VC++ 7.1 complains about the post 
build. After "playing around" I found the reason why: VS 7.0 has no 
problems with multiple command line instructions, but VC++ 7.1 wants 
them to be in one command line (I tried this by hand and it worked). But 
I don't know how to tell cmake to put them all into one line? Or is this 
a VC++ 7.1 bug?

Hope someone could help. Thanks.

Ciao,
Marco


More information about the Cmake mailing list