How to tell CMake which libpng.dylib to use?

Michael Dickens michaelld at macports.org
Mon Jan 21 16:05:06 PST 2013


Hi Mojca - I'm glad that worked for you.  What I've done in the past is,
in a PortGroup, created a variable that one can use.  For example, the
qt4-1.0 PortGroup contains the variable "qt_cmake_defines" which defines
4 different CMake variables.  kde-1.1 defines even more -- we just kept
adding them for each new port; having extra defines has never caused
CMake to not work, in my experience.  I would recommend you using a
PortGroup if that makes sense, for whatever "group" you can define for
your ports of interest. - MLD

On Jan 21, 2013, at 5:24 PM, Mojca Miklavec <mojca at macports.org> wrote:
> Thank you very much. The magic turned out to give the correct result:
>     -DPNG_LIBRARY=/opt/local/lib/libpng.dylib \
>     -DPNG_PNG_INCLUDE_DIR=/opt/local/include
>  (The only thing I wonder is: isn't there some way to set those variables "globally" somewhere, so that it doesn't have to be repeated by every single program/port? ;)


More information about the macports-dev mailing list