[CMake] RUNTIME_OUTPUT_DIRECTORY does not affect DLL stub lib

Eric (Brad) Lemings brad at rebit.com
Tue Oct 21 12:04:42 EDT 2008


Eric (Brad) Lemings wrote:
> Greetings,
>
> I just noticed that if you define RUNTIME_OUTPUT_DIRECTORY before
> linking a DLL on Windows, CMake will link the DLL in the appropriate
> location as well as the incremental link files and manifests but not
> the DLL stub library for linking to it.
>
> Example:
>
> FINAL LINK:
> C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo
> @CMakeFiles\shared_foo_lib.dir\objects.rsp /out:..\..\runtime\foo.dll
> /implib:foo.lib
> /pdb:C:\Users\myself\Build\branch\my-branch\runtime\foo.pdb /dll
> /version:0.0 /MANIFEST /STACK:10000000 /machine:I386 /debug
> /INCREMENTAL:YES -LIBPATH:C:\Users\myself\Build\branch\my-branch\archive
> -LIBPATH:C:\Users\myself\Build\branch\my-branch\runtime enm.lib ent.lib
> utl.lib cfs.lib cmn.lib C:\Progra~2\Trolltech\Qt\4.4.3\lib\QtGuid4.lib
> imm32.lib winmm.lib C:\Progra~2\Trolltech\Qt\4.4.3\lib\QtSqld4.lib
> C:\Progra~2\Trolltech\Qt\4.4.3\lib\QtCored4.lib ws2_32.lib kernel32.lib
> myself32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib
> uuid.lib comfoo32.lib advapi32.lib
> /MANIFESTFILE:..\..\runtime\foo.dll.intermediate.manifest
> ..\..\runtime\foo.dll.embed.manifest.res
>
> Notice the /implib:foo.lib does not specify the same path as the
> other path-based flags.  Is this correct behavior?
>
> Thanks,
> Eric.
BTW, the link command also produces a .exp file that is not stored
in/moved to the RUNTIME_OUTPUT_DIRECTORY.

Eric.



More information about the CMake mailing list