[CMake] Copying Files on Windows

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Tue Dec 12 12:10:56 EST 2006


Mike Jackson schrieb:
> I have been trying to copy some files using CMake and not having much luck. Note that basically the same code works fine on OS X and Linux.. 
> 
> #-- If we are on MinGW then copy the required libraries
>  IF (MINGW)
>  	#=== Copy in the Qt Libs===
>  	SET (QTLIBS 
>  		libQtCore.dylib
>  		libQtGui.dylib
>  	)
>   FOREACH (depLib ${QTLIBS})
>  	 	ADD_CUSTOM_COMMAND (
>   			TARGET A2BinGui
>   			POST_BUILD
>   			COMMAND ${CMAKE_COMMAND}
>   			ARGS -E copy ${QT_LIBRARY_DIR}/${depLib} "${EXECUTABLE_OUTPUT_PATH}/${depLib}"
>   	)
>   ENDFOREACH (depLib)	
>  ENDIF (MINGW)
> 
> 
> So is there something I am missing? I get the following error when mingw32-make is run:
> Error copying file "C:/Developer/SDKs/qt-4.2.2/lib/libQtCore.dylib" to "C:/Workspace/a2bin/Build/Bin".
> 
> Could someone have pity on my and let me know what I am doing wrong?
> 
Did you thought about that there is no libQtCore.dylib and
libQtGui.dylib on windows? And why do you need to copy those libs??

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20061212/2ad48918/signature.pgp


More information about the CMake mailing list