[CMake] Problems with cmake, visualstudio generator and add_library / target_link_libraries

Michael Jackson mike.jackson at bluequartz.net
Wed Sep 24 08:46:25 EDT 2008


Did you try running cmake from a clean build directory? Also, can  
cmake actually find the ws2_32 library? Were there warnings when you  
ran cmake? You may have to use the "Find_Library()" command to  
actually find the ws2_32 library before CMake can use it. Just  
guessing at this point.

Mike

On Sep 24, 2008, at 8:42 AM, Thomas Veith wrote:

> Thanks for the hint, nevertheless CMake still generates
> 			<Tool
> 				Name="VCLibrarianTool"
> 				OutputFile="D:\exp\lala\common\socket\prj\vc80\Debug\socket.lib"/>
> instead of
> 			<Tool
> 				Name="VCLibrarianTool"
> 				AdditionalDependencies="ws2_32.lib"
> 				OutputFile="D:\exp\lala\common\socket\prj\vc80\Debug\socket.lib"/>
> Any further ideas?
>
> Thanx in advance,
> Thomas
>
> 2008/9/24 Michael Jackson <mike.jackson at bluequartz.net>:
>> target_link_libraries(socket  ws2_32)
>>
>>
>> Cmake will figure out the proper suffix to use.
>>
>> Mike
>>
>>
>> On Sep 24, 2008, at 4:56 AM, Thomas Veith wrote:
>>
>>> target_link_libraries(socket  ws2_32.lib
>>
>>



More information about the CMake mailing list