Sorry. I didn't mean to answer directly to the person who posted. ---------- Forwarded message ---------- From: Alain Leblanc <[email protected]> Date: 2009/10/8 Subject: Re: [CMake] Problem ignoring libcmt.lib on Windows To: "Gooch, Allen" <[email protected]>
I was also struggling with this issue. I think I got it working. The only differences I have with what you do are: 1) I don't use the double quotes around the library name 2) I don't add the .lib in the library name. I know very little about the MSVC compiler, so I don't know if it would make a difference, but it's probably worth a try. a 2009/10/8 Gooch, Allen <[email protected]> I have a project with a shared library target on Windows XPsp3 with > VS2005/VS2008 using CMake 2.6 patch 4. It seems that CMake adds winmm.lib > and libcmt.lib as a dependency automatically for me. I've tried to have this > library ignored in one project, as it causes duplicate symbols. Based on my > perusal of the docs and the mailing lists, I've added the following to my > CMakeLists.txt file: > > set_target_properties (FooLib PROPERTIES LINK_FLAGS > "/NODEFAULTLIB:\"libcmt.lib\"") > > This does not seem to affect behavior. When I open up the Linker->Input > tab in my generated project's properties I still see libcmt.lib added to the > end of "Additional Dependencies". The Linker->Command Line tab shows the > /NODEFAULTLIB:"libcmt.lib" in the "All options" pane, as well as the > libcmt.lib at the end. If I manually modify the "Additional Dependencies" > field to remove libcmt.lib, my build completes as expected. > > I've tried various ways to specify the library to ignore, including quoting > the library name and omitting the .lib suffix with no success. How do I > achieve having libcmt.lib not show up in the "Additional Dependencies", or > alternatively, have it actually ignored. > > Many thanks in advance, > > Allen Gooch > Senior Server Programmer, BioWare > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
