<div class="gmail_quote">On Fri, Jan 14, 2011 at 3:43 PM, Pau Garcia i Quiles <span dir="ltr"><<a href="mailto:pgquiles@elpauer.org">pgquiles@elpauer.org</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;">
Hi,<br>
<br>
I'm trying to get this working on Windows using a self-contained build<br>
environment that does NOT have Perl in path.<br>
<br>
It's a .bat file which downloads CMake and Perl and then fires a<br>
CMakeLists.txt with the ExternalProject_Add to build zlib (no problem<br>
after the patches I sent yesterday) and OpenSSL.<br>
<br>
One problem I've found is the PATH environment variable.<br>
ExternalProject_Add does not allow to set it, which forces me to use<br>
CMake in command mode + set (ENV{PATH} ... ) + execute_process. Ugly.<br>
<br>
Features I'm missing in ExternalProject_Add and I just realized<br>
"thanks" to OpenSSL:<br>
- Add a PATH parameter to ExternalProject_Add,<br>
ExternalProject_Add_Step and execute_process. It should override the<br>
default path. Adding new directories to the path would be possible by<br>
doing PATH "$ENV{PATH}:/my/new/dir/in/path"<br></blockquote><div><br>Good suggestion. Actually, we've wanted to add a feature to specify environment variables to arbitrary calls to add_custom_command for quite a while, but there are some subtle details behind it, and we haven't found the time and funding to get that done yet. This would be an easy pass-through from ExternalProject to such a feature as soon as the underlying feature exists in add_custom_command.<br>
<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- Define variables for SOURCE_DIR, BINARY_DIR, etc even if EP_PREFIX<br>
and EP_BASE are not set<br></blockquote><div><br>Not sure what you mean here?<br><br>If you got a ExternalProject_Get_Property(${proj} source_dir) immediately after an ExternalProject_Add call you can retrieve the value of its source dir regardless of if you have EP_PREFIX or EP_BASE set, right? Those only control some of the default layouts that we had come up with when trying to organize things.<br>
<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my<br>
custom step, but it's much more complex)<br></blockquote><div><br>How many would you like? Why not just run a script as the single configure command, and then have your script do the multiple steps needed?<br> <br><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Another more issue I'm seeing with ExternalProject_Add is tarballs<br>
with symlinks on Windows. The OpenSSL contains symlinks, which leads<br>
to a broken source dir because CMake is unable to create some files.<br>
Maybe CMake should pass libarchive some parameter? (if I extract the<br>
OpenSSL tarball with WinRAR, it does not fail)<br></blockquote><div><br>What does WinRAR give you? Symlinks because the Windows you're using supports them? Or copies of the linked-to files in place of symlinks? Or something else?<br>
<br> <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 class="im"><br>
On Fri, Jan 7, 2011 at 9:34 PM, kent williams <<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>> wrote:<br>
</div><div><div></div><div class="h5">> This shouldn't be a big deal -- something like this should work:<br>
><br>
> ExternalProject_add(OpenSSL<br>
> URL "<a href="http://www.openssl.org/source/openssl-1.0.0c.tar.gz" target="_blank">http://www.openssl.org/source/openssl-1.0.0c.tar.gz</a>"<br>
> URL_MD5 ff8fb85610aef328315a9decbb2712e4<br>
> CONFIGURE_COMMAND ./config --prefix="${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"<br>
> BUILD_IN_SOURCE 1<br>
> INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"<br>
> )<br>
> set(OPENSSL_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/include")<br>
> link_directories("${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/libs)<br>
> set(OPENSSL_LIBRARIES ssl ssleay32 ssleay32MD)<br>
><br>
> The problem is that OpenSSL doesn't handle configuration scripts in<br>
> the usual way -- the configure script wants you to specify your<br>
> platform/compiler string.<br>
><br>
> They provide an 'automatic' script instead called config, so<br>
><br>
> config --prefix=...<br>
><br>
> Does mostly what you want, but they make you handle the OS X 64-bit<br>
> case manually -- it wants you to run configure and tell it explicitly<br>
> about the platform:<br>
><br>
> ./Configure darwin64-x86_64-cc<br>
><br>
> This is kind of crazy, but OK, whatever. So I need to try and figure<br>
> out at configure time if it's an OS X build and if it's a 64 bit<br>
> build. I can use<br>
><br>
> if(APPLE)<br>
><br>
> to detect an Mac platform, but there's no way I can figure out to<br>
> determine if the currently selected build type is 64 bits. And I<br>
> think that the stock OpenSSL distribution would completely lose its<br>
> mind if you tried to configure a Universal Binary build!<br>
><br>
> Any suggestions?<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>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Pau Garcia i Quiles<br>
<a href="http://www.elpauer.org" target="_blank">http://www.elpauer.org</a><br>
(Due to my workload, I may need 10 days to answer)<br>
</font><div><div></div><div class="h5">_______________________________________________<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>