[CMake] how to write CMakeLists.txt to use exiv2?

kdsfinger at gmail.com kdsfinger at gmail.com
Thu Feb 7 14:37:22 EST 2008


hi, there
I am trying to use exiv2 in my c++ program, but not sure how to set
this up with cmake.
There is FindExiv2.cmake on the internet but now work (and I guess is
now out of date). After install the exiv2, it locates in the following
dir:

/usr/include/exiv2
/usr/include/exiv2/exiv2_version.h
/usr/lib/pkgconfig/exiv2.pc
/usr/bin/exiv2
/usr/bin/exiv2-config
/usr/share/doc/exiv2

How can I write a CMakeLists.txt so that my helloworld.cpp can use the
functions defined in exiv2? (Or how can I write a FindExiv2.cmake to
get it work?)

Currently, I don't have FindExive.cmake and did not say anything in
CMakeLists.txt about exiv2. I set up the EXIV2_DIR /usr/bin/exiv2 by
"ccmake .". But when I make the program, there are errors about
"undefined reference".

Thanks for your help.

zl2k


More information about the CMake mailing list