<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:#606420;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 69.6pt 72.0pt 69.6pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=FR link=blue vlink="#606420">
<div class=Section1>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Thanks for that suggestion; I had read it in the cmake
book addendum, then forgot about it.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Exporting in the reference build tree made the trick. No
exactly what I want though, as it stores absolute path so I can't move it
afterwards, but I can correct that with a perl script.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>It also exports library dependency information, which
is exactly and mostly what I needed.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>One small issue:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>In my test example, I have lib1 depending on lib2
depending on lib3 depending on lib1.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Exporting libs 1 and 2 works fine.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Exporting lib3 outputs the following error, although
it generates the correct export file. I do need to have a different export file
for each lib, so I can't use the APPEND option:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'> CMake Error at
lib3/CMakeLists.txt:16 (export):<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'> export called with
target "3" which requires target "1" that is not in the<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'> export list.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'> If the required target
is not easy to reference in this call, consider<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'> using the APPEND option
with multiple separate calls.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Would there be a way to avoid this error?<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Regards,<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'>Alexandre<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span lang=EN-US
style='font-size:10.0pt'>-----Original Message-----<br>
From: cmake-bounces@cmake.org [mailto:cmake-bounces@cmake.org] On Behalf Of Andreas
Pakulat<br>
Sent: Monday, 12 January 2009 14:38<br>
To: cmake@cmake.org<br>
Subject: Re: [CMake] Define a library target without using the
add_librarycommand ? <==> Working with repositories</span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>On 12.01.09 11:27:29, Alexandre Feblot wrote:<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>> Is there a way to define a library target, on which I could use<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>> target_link_libraries(), without creating/building this library,
i.e.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>> without defining it with add_library(), but with add_custom_target
for<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>> instance ?<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>In CMake 2.6 you can export and import targets, which might be an
option.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>The CMake manual tells you more about this, just look for install and<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>EXPORT.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>Andreas<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'> <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>-- <o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>You will be advanced socially, without any special effort on your part.<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>_______________________________________________<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>CMake mailing list<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>CMake@cmake.org<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'>http://www.cmake.org/mailman/listinfo/cmake<o:p></o:p></span></font></p>
<p class=MsoPlainText><font size=2 face="Courier New"><span style='font-size:
10.0pt'><o:p> </o:p></span></font></p>
</div>
<br clear=all> This email was sent to you by Thomson Reuters, the global news and information company.<br>
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
</body>
</html>