I'm using Fedora 10. The KDevelop3 and normal makefile generator produce the same result. CMake version: ccmake version 2.6-patch 3<br><br>My CMakeLists.txt file is:<br>--------------------------------------------------------<br>
cmake_minimum_required(VERSION 2.6)<br><br>Project(BoostProgramOptions)<br><br>INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} /home/doriad/src/boost)<br><br>LINK_DIRECTORIES(${LINK_DIRECTORIES} /home/doriad/bin/boost/lib)<br>
<br>ADD_EXECUTABLE(BoostProgramOptions BoostProgramOptions.cpp)<br>TARGET_LINK_LIBRARIES(BoostProgramOptions boost_program_options)<br><br>ADD_EXECUTABLE(MultipleLists MultipleLists.cpp)<br>TARGET_LINK_LIBRARIES(MultipleLists boost_program_options-mt)<br>
--------------------------------------------------------<br><br>and the link.txt that is produced is:<br><br>--------------------------------------------------------<br>/usr/lib/ccache/c++ -fPIC CMakeFiles/BoostProgramOptions.dir/BoostProgramOpt<br>
ions.cpp.o -o BoostProgramOptions -rdynamic -L/home/doriad/bin/boost/lib -lboos<br>t_program_options -Wl,-rpath,/home/doriad/bin/boost/lib<br>--------------------------------------------------------<br><br clear="all">Thanks,<br>
<br>David<br>
<br><br><div class="gmail_quote">On Wed, Apr 15, 2009 at 9:12 AM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">David Doria wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
When I add a line like this:<br>
<br>
TARGET_LINK_LIBRARIES(MyProject boost_program_options-mt)<br>
<br>
in my link.txt file, -lboost_program_options gets produced instead (without the "-mt"), and therefore the library cannot be found. I've been creating a symlink with the name without the -mt and that works, but it seems silly to have to do that. Is there a way to link to a library name which contains a "-"?<br>
</blockquote>
<br></div></div>
I cannot reproduce this. I get "-lboost_program_options-mt".<br>
<br>
What version of CMake?<br>
What platform?<br>
What generator?<br><font color="#888888">
<br>
-Brad<br>
</font></blockquote></div><br>