I built the list by hand though trial and error. I'm not sure if and how llvm-config works with cmake. Its seems now that I got the right dependencies in the right order, there have been no ongoing maintenance issues.<br>
<br><div class="gmail_quote">On Sun, Jun 13, 2010 at 4:32 PM, sam lee <span dir="ltr"><<a href="mailto:skynare@gmail.com">skynare@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Ah, thank you so much.<br>How did you get the list of target_link_libraries() ?<br>Did you use llvm-config?<br>If you did not have access to llvm-config, how would you get list of libraries to link to?<br><br>Thanks.<br><font color="#888888">Sam</font><div>
<div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Sun, Jun 13, 2010 at 2:44 PM, Nathan Jeffords <span dir="ltr"><<a href="mailto:blunted2night@gmail.com" target="_blank">blunted2night@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div>This isn't meant to be a sample, but I can share with you the cmake files I use for my compiler. It builds in both windows user MSVC, and linux using G++, but should work with MinGW.<div><br></div><div>
the structure is</div>
<div><br></div><div>src/</div><div>  CMakeLists.txt  # root make file</div><div>  front/</div></div><div><div>    CMakeLists.txt  # library  <br><div>  middle/</div><div>    CMakeLists.txt # library<br></div><div>
<div>  back/</div><div>
    CMakeLists.txt # library<br></div></div><div><div><div>  npp/</div><div>    CMakeLists.txt # executable<br></div></div></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_quote"><div>
On Sun, Jun 13, 2010 at 8:00 AM, Óscar Fuentes <span dir="ltr"><<a href="mailto:ofv@wanadoo.es" target="_blank">ofv@wanadoo.es</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div>sam lee <<a href="mailto:skynare@gmail.com" target="_blank">skynare@gmail.com</a>> writes:<br>


<br>
> Hi,<br>
><br>
> I built LLVM on Windows XP through cmake and MinGW make. That was a breeze!<br>
> Now, I wanted to start a project.<br>
> It seems like I need Makefile.rules and Makefile.config to start a new<br>
> project (from <a href="http://llvm.org/docs/Projects.html" target="_blank">http://llvm.org/docs/Projects.html</a>).<br>
<br>
</div>Those files are unrelated to cmake.<br>
<div><br>
> And llvm/projects/sample uses autoconf (or ./configure). Is there cmake<br>
> based sample project available?<br>
> I could not find any from official release. Has any of you written sample<br>
> project template that uses cmake?<br>
<br>
</div>Just make a directory under LLVM_ROOT/projects and put your source<br>
there, with a CMakeLists.txt file that contains the right directives<br>
(you can use any of the llvm tools or libraries under LLVM_ROOT/tools or<br>
LLVM_ROOT/lib as an example.) After creating those files, you must<br>
re-invoke cmake for it taking notice of your new project.<br>
<br>
Another approach is to build and install LLVM and write your project as<br>
an standalone source tree outside LLVM's. Then link the LLVM libraries<br>
into your executable.<br>
<br>
[snip]<br>
<br></div><div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></blockquote></div><br></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>