AW: AW: [CMake] CMake 2.4.7: Generator "Visual Studio 7 .NET 2003" seems to ignore certain LINK_FLAGS properties (worked in 2.4.6)

Bill Hoffman bill.hoffman at kitware.com
Tue Jul 31 12:16:45 EDT 2007


Gerhard Grimm wrote:
> Hi Bill,
>
> thanks for your hints. The /DEF problem is fixed now.
>
> However, changing the resource container's target type from executable
> to library (to avoid passing the /DLL flag explicitly) raised another
> problem:
> The resource container (which BTW is not the target from my previous
> example, it only contains resources and has no exports) is added as
> dependency to another library target using
>
> add_dependencies(OtherLibrary ResourceContainer)
>
> [The reason for this is the creation of a header file by a custom command
> when building the resource container. This header file contains resource
> IDs and is needed when building the OtherLibrary.]
>
> Since the ResourceContainer is now considered a library by Visual Studio,
> it attempts to link the OtherLibrary with it by adding a non-existing
> import library to the OtherLibrary's linker command line, although this
> is mentioned nowhere in the generated project file.
>
> I'll try to build a dummy import library for the ResourceContainer...
>   
OK, you lost me, I have no idea what a ResourceContainer is...
If you could give a complete example that shows your problem I might be 
able to help.
We have lots of Qt based projects that generate .h files with custom 
commands.
As long as the .h files are in your source list things should work.  

-Bill



More information about the CMake mailing list