On Thu, Nov 12, 2009 at 6:59 PM, Hugh Sorby <[email protected]> wrote:

>
> 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
>
> cmake
> make
> make install
>
>
This should work out of the box with the CMakePorts packaging of libpng &
zlib if you want to try those.

1. Download libpng & zlib
http://code.google.com/p/cmakeports/downloads/list

2. Add the following to your toplevel CMakeLists...
add_subdirectory(zlib)
add_subdirectory(png)

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().

4. If you want to control the install options of these libraries (ie. header
files, executables, etc.) you can use SKIP_INSTALL_[HEADERS | LIBRARIES |
EXECUTABLES | FILES | ALL].

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to