[cmake-developers] Trouble with FindPNG module

Ben Boeckel ben.boeckel at kitware.com
Mon Apr 24 11:02:27 EDT 2017


On Mon, Apr 24, 2017 at 09:54:18 -0500, Robert Dailey wrote:
> On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey <rcdailey.lists at gmail.com> wrote:
> > I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
> >
> > find_package(PNG REQUIRED)
> >
> > Which gives me the output in CMake:
> >
> > Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
> >
> > The CMakeCache.txt file has these variables set:
> >
> > PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
> > PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
> > PNG_PNG_INCLUDE_DIR:PATH=/usr/include
> >
> > So it found the headers, but not the libs. Why did it not find the
> > libs? Note that my version of Ubuntu is 64-bit, and I've installed the
> > 32-bit libs like so:
> >
> > $ sudo apt-get install libpng12-dev:i386

What compiler are you using (what does CMake say it is?)? Does an
`strace` of CMake configuring the project show anything interesting?
`cmake --trace-expand`?

--Ben


More information about the cmake-developers mailing list