Try:<div><span class="Apple-style-span" style="border-collapse: collapse; ">set_target_properties(qlom<br>       PROPERTIES<br>       LINK_FLAGS ${GLOM_LDFLAGS})</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">(without the double quotes).....</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span><br><div class="gmail_quote">
On Mon, Oct 26, 2009 at 2:46 PM, Murray Cumming <span dir="ltr">&lt;<a href="mailto:murrayc@murrayc.com">murrayc@murrayc.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 2009-10-23 at 13:42 +0200, Murray Cumming wrote:<br>
&gt; pkg_search_module() defines SOMEPREFIX_LIBRARY_DIRS among other things,<br>
&gt; as mentioned here<br>
&gt; <a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindPkgConfig.cmake?root=CMake&amp;view=markup" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindPkgConfig.cmake?root=CMake&amp;view=markup</a><br>

&gt; (better than the documentation at<br>
&gt; <a href="http://www.itk.org/Wiki/CMake:How_To_Find_Libraries" target="_blank">http://www.itk.org/Wiki/CMake:How_To_Find_Libraries</a><br>
&gt; )<br>
&gt;<br>
&gt; But how can I use those directories so my executable can actually be<br>
&gt; linked against the SOMEPREFIX_LIBRARIES libraries that I&#39;ve specified to<br>
&gt; target_link_libraries().<br>
<br>
</div>I&#39;m still stuck at this stage. I&#39;ve tried doing this:<br>
<br>
set_target_properties(qlom<br>
        PROPERTIES<br>
        LINK_FLAGS &quot;${GLOM_LDFLAGS}&quot;)<br>
<br>
But the linker flags then seem to be separated by &quot;;&quot; instead of spaces,<br>
leading to error such as this:<br>
<br>
c++: unrecognized option<br>
&#39;-pthread;-L/opt/gnome228/lib;-lglom-1.12;-lgiomm-2.4;-lgdamm-4.0;-lxml<br>
++-2.6;-lgio-2.0;-lgmodule-2.0;-lgda-4.0;-lgthread-2.0;-lrt;-lxml2;-lglibmm-2.4;-lgobject-2.0;-lsigc-2.0;-lglib-2.0&#39;<br>
<br>
Surely there must be a simple way to use pkg-config?<br>
<br>
<br>
My full CMakeList.txt so far is here, in case it&#39;s helpful:<br>
c++: unrecognized option<br>
&#39;-pthread;-L/opt/gnome228/lib;-lglom-1.12;-lgiomm-2.4;-lgdamm-4.0;-lxml<br>
++-2.6;-lgio-2.0;-lgmodule-2.0;-lgda-4.0;-lgthread-2.0;-lrt;-lxml2;-lglibmm-2.4;-lgobject-2.0;-lsigc-2.0;-lglib-2.0&#39;<br>
make[2]: Leaving directory `/home/murrayc/checkout/gnome/qlom_murrayc&#39;<br>
<div><div></div><div class="h5"><br>
<br>
&gt; Actually, I would much rather just tell the build system to use<br>
&gt; SOMEPREFIX_LDFLAGS instead of dealing with the directories and libraries<br>
&gt; separately. That&#39;s what I do with autoconf/automake.<br>
&gt;<br>
&gt;<br>
&gt; Also, if I use several libraries, do I need separate pkg_search_module()<br>
&gt; calls, and therefore several sets of variables? I&#39;d much rather just<br>
&gt; give a list of libraries and get one set of CFLAGS and LDFLAGS. Again,<br>
&gt; that&#39;s what I do with autoconf/automake.<br>
<br>
--<br>
<a href="mailto:murrayc@murrayc.com">murrayc@murrayc.com</a><br>
<a href="http://www.murrayc.com" target="_blank">www.murrayc.com</a><br>
<a href="http://www.openismus.com" target="_blank">www.openismus.com</a><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>