No subject


Sun Apr 3 09:54:08 EDT 2011


<br>
mkdir build &amp;&amp; cd build<br>
cmake ..<br>
make MY_APP<br>
<br>
Further, assuming your library also gets build with CMake, you probably hav=
e an add_directory(../MY_LIB ../MY_LIB) in your main lists-file (otherwise =
you should) and then the link_directories() command is not needed. I create=
d sort of a &#39;standard&#39; machinery for building a list of &#39;sub-pa=
ckages&#39; using CMake. It&#39;s not well documented and probably still ha=
s many issues, but I could mail it to you if you think it may help you get =
started and if you&#39;re interested.<br>

<br>
Greetsz,<br>
Jakob<br>
<br>
On 06/16/2011 11:54 PM, David Springate wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am new to CMake - and whilst I am immediately impressed with it&#39;s rel=
ative ease of use - I have a &#39;noob&#39; question, I&#39;m sure!<br>
<br>
I have the following:<br>
A library called MY_LIB that builds with a cmake command (I have created a =
nice CMakeLists.txt file)<br>
An application called MY_APP that builds a nice application - and even link=
s in MY_LIB using:<br>
link_directories(&quot;../MY_LIB&quot;)<br>
target_link_libraries(MY_APP MY_LIB)<br>
<br>
Now, first of all I know that I&#39;m not supposed to use relative paths.. =
but we&#39;ll call a side issue.. (though I&#39;d be happy to hear the corr=
ect way of doing things!) - the real problem that I have is this:<br>
<br>
Give than MY_LIB is built using CMake and MY_APP is built using CMake.. how=
 can I setup my build scripts so that I can call CMake once for MY_APP, it&=
#39;ll realise that it needs MY_LIB, which hasn&#39;t yet been built, invok=
e CMake for MY_LIB and then link itself with MY_APP?<br>

<br>
I ask because I use libraries heavily to organise my code (and reuse) and w=
ould love to switch to CMake for all my building (XCode 4 has forced my han=
d!) but I can&#39;t seem to figure this out.<br>
<br>
Please help a newcomer out - any help is greatly appreciated!<br>
<br>
Thanks,<br>
<br>
David<br>
</blockquote>
______________________________<u></u>_________________<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/<u>=
</u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_blank">h=
ttp://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>David Springate<br><a h=
ref=3D"mailto:david.springate at gmail.com">david.springate at gmail.com</a><br>

--bcaec520e885eb453d04a5e4b102--


More information about the CMake mailing list