This recently submitted bug is probably related:<br><a href="http://public.kitware.com/Bug/view.php?id=10346">http://public.kitware.com/Bug/view.php?id=10346</a><br><br>I have not had a chance to investigate yet, but it sounds like you are not alone in experiencing the "no download given" error when specifying a SOURCE_DIR...<br>
<br>Keep an eye on that bug for future updates.<br><br><br>David<br><br><br><br><div class="gmail_quote">On Mon, Mar 1, 2010 at 3:35 AM, Luigi Calori <span dir="ltr"><<a href="mailto:l.calori@cineca.it">l.calori@cineca.it</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 class="im">Michael Wild wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 1. Mar, 2010, at 4:10 , Albert Z wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I just found that unless I explicitly include ExternalProject.cmak in my<br>
cmake build, cmake won't find command "ExternalProject_Add", which is pretty<br>
weird for me.<br>
include(/usr/local/share/cmake-2.8/Modules/ExternalProject.cmake)<br>
<br>
</blockquote>
<br>
Again:<br>
<br>
include(ExternalProject)<br>
<br>
will do... But then, the man-pages would tell you that.<br>
<br>
</blockquote></div>
The<br>
<br>
ExternalProject.cmake contains the function ExternalProject_Add ... so you have to explicitly include it to have the function defined.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
And now the problem is that if I use the following cmake script to build apr<br>
<br>
ExternalProject_Add(${LIB_NAME}<br>
PREFIX /home/xxx/prj/trunk/external/apr/1.3.9<br>
SOURCE_DIR /home/xxx/prj/trunk/external/apr/1.3.9<br>
CONFIGURE_COMMAND /home/xxx/prj/trunk/external/apr/1.3.9/configure<br>
--enable-static --disable-shared --disable-ipv6<br>
BINARY_DIR "/home/xxx/prj/trunk/external/apr/1.3.9/.libs/"<br>
BUILD_COMMAND make all<br>
)<br>
<br>
<br>
</blockquote>
<br>
You most probably don't want to use hard-coded paths, but something relative to either CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR.<br>
<br>
</blockquote></div>
Correct, otherwise you ' ll have to change your cmake code whan move the<br>
stuff<div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
CMake complains<br>
<br>
error: no download info for 'apr' -- please specify existing SOURCE_DIR or<br>
one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or<br>
DOWNLOAD_COMMAND<br>
<br>
I have already specified the SOURCE_DIR, and I do not want the library is<br>
downloaded online. Is it a bug of CMake? Or I have done something wrong?<br>
<br>
</blockquote>
<br>
Does SOURCE_DIR exist and contain the apr sources?<br>
<br>
If I was you, I'd prefer to specify a URL to a tar-ball on the local system (e.g. ${CMAKE_SOURCE_DIR}/external/apr-1.3.9.tgz), point SOURCE_DIR to ${CMAKE_BINARY_DIR}/external/apr and then let CMake to the rest.<br>
<br>
</blockquote></div>
If your source is alredy complete, try setting up DOWNLOAD_COMMAND ""<br>
Anyway, I agree it would be probably better specifying a URL (either<br>
local or remote) like<br>
URL <a href="http://apache.fastbull.org/apr/apr-1.3.9.tar.gz" target="_blank">http://apache.fastbull.org/apr/apr-1.3.9.tar.gz</a> and let him do: it<br>
is cleaner and easier.<br>
<br>
Then if you have mods, you can specify a PATCH_COMMAND to apply your patches<br>
If apr configure must be run in-source, specify<br>
<br>
BUILD_IN_SOURCE 1<br>
<br>
But in that case, if you do not have a download step, your source will be cluttered, so another good reason<br>
to specify a URL<br>
<br>
I' ll probably would add some configure based libs to my deps, If you are interested, I' ll let you know.<br><font color="#888888">
<br>
Luigi</font><div><div></div><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Also, I might be wrong, but are you building in-source? If so, please don't and read <a href="http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees</a>.<br>
<br>
Michael<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sun, Feb 28, 2010 at 5:45 PM, Albert Z <<a href="mailto:amzproject@gmail.com" target="_blank">amzproject@gmail.com</a>> wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks, Luigi. However, I read the CMake 2.8 doc and tried to use function<br>
"ExternalProject_Add". When I ran cmake in the root of my project, I got the<br>
following error<br>
<br>
Unknown CMake command "ExternalProject_Add"<br>
<br>
I tried on both linux and mac and got the same error. And I am sure the<br>
version of the cmake is 2.8<br>
<br>
Best,<br>
Meng<br>
<br>
<br>
On Sun, Feb 28, 2010 at 4:50 AM, Luigi Calori <<a href="mailto:l.calori@cineca.it" target="_blank">l.calori@cineca.it</a>> wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Albert Z wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
Our project now uses a bunch of 3rd party libraries such as apr,<br>
protobuf, libcurl, etc. Almost all of these libraries use autoconf (<br>
<a href="http://configure.in" target="_blank">configure.in</a> <<a href="http://configure.in" target="_blank">http://configure.in</a>>) based build system. Since we have<br>
some modifications to most of the libraries, we have to integrate these<br>
libraries to our cmake build tree. What is the easiest way to integrate such<br>
a 3rd-party library to a cmake build with keeping the maximum portability?<br>
<br>
<br>
</blockquote>
Try to look at ExternalProject module<br>
<a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject" target="_blank">http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject</a><br>
and page 10 of<br>
<a href="http://www.kitware.com/products/archive/kitware_quarterly1009.pdf" target="_blank">http://www.kitware.com/products/archive/kitware_quarterly1009.pdf</a><br>
<br>
I have used it (with some mods): it allow to automate download<br>
pactch,build and install)<br>
Anyway, curl have recently included a CMakeLists in its distribution. I<br>
have used it even if had to apply some patches.<br>
I am trying to collect some cmake build recipes for some libraries I need.<br>
If you are interested, grab the stuff at<br>
bzr branch <a href="http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib" target="_blank">http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib</a><br>
<br>
HTH<br>
<br>
Luigi<br>
<br>
------------------------------------------------------------------------<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<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:<br>
<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>
<br>
<br>
</blockquote>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<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:<br>
<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>
<br>
<br>
</blockquote>
<br>
</blockquote>
_______________________________________________<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>
<br>
</blockquote>
<br>
<br>
<br>
<br>
</blockquote>
<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>