[CMake] How does cmake find libraries?

John Drescher drescherjm at gmail.com
Thu Jun 16 12:55:21 EDT 2011


>    [ 74%] Built target test_sethandler
>    make[2]: *** No rule to make target `/usr/local/lib/libpng.dylib', needed
> by `tests/na/common/test_common'.  Stop.
>    make[1]: *** [tests/na/common/CMakeFiles/test_common.dir/all] Error 2
> The obvious reason is that /usr/local/lib/libpng.dylib doesn't exist:
>   arc:mbuild douglasl$ ls /usr/local/lib/ | grep png
>   arc:mbuild douglasl$
> But my cmake cache shows:
>   LIBPNG_INCLUDE_DIR:PATH=/Library/Frameworks/Mono.framework/Headers
>   LIBPNG_LIBRARY:FILEPATH=/usr/local/lib/libpng.dylib
>   //ADVANCED property for variable: LIBPNG_INCLUDE_DIR
>   LIBPNG_INCLUDE_DIR-ADVANCED:INTERNAL=1
>   //ADVANCED property for variable: LIBPNG_LIBRARY
>   LIBPNG_LIBRARY-ADVANCED:INTERNAL=1
> Can someone shed some light on how cmake is finding that module?
> Sounds like the machine config is broken, but I'm not sure exactly how to
> fix it.

Does png.h exist in this folder

/Library/Frameworks/Mono.framework/Headers

John


More information about the CMake mailing list