<div class="gmail_quote">On Thu, Nov 12, 2009 at 6:59 PM, Hugh Sorby <span dir="ltr"><<a href="mailto:h.sorby@auckland.ac.nz">h.sorby@auckland.ac.nz</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;">
<br>
I am trying to compile zlib and libpng with one command, or more specifically one series of commands. My aim is to get as simple as possible to the following<br>
<br>
cmake<br>
make<br>
make install<br><br></blockquote><div> </div><div>This should work out of the box with the CMakePorts packaging of libpng & zlib if you want to try those.<br><br>1. Download libpng & zlib<br><a href="http://code.google.com/p/cmakeports/downloads/list">http://code.google.com/p/cmakeports/downloads/list</a><br>
<br>2. Add the following to your toplevel CMakeLists...<br>add_subdirectory(zlib)<br>add_subdirectory(png)<br><br>3. The standard CMake variables generated by a find_package() call are present... so just use ZLIB_FOUND, ZLIB_INCLUDE_DIR, etc. like you normally would as if you were calling find_package().<br>
<br>4. If you want to control the install options of these libraries (ie. header files, executables, etc.) you can use <tt>SKIP_INSTALL_[HEADERS | LIBRARIES | EXECUTABLES | FILES | ALL]</tt>. <br clear="all"><br></div></div>
-- <br>Philip Lowman<br>