On 02/09/2012 02:52 PM, Jens Bäckman wrote:
It's actually very simple, if you use pkg-config.
find_package(PkgConfig REQUIRED) pkg_check_modules(SIGC2 REQUIRED
sigc++-2.0) include_directories(${SIGC2_INCLUDE_DIRS}) # Define how
to build yourapp here target_link_libraries(yourapp
${SIGC2_LIBRARIES})
Thanks, Jens. Your suggestion appears to work. The only issue I've
noticed is that it appears checking for a module's version doesn't work
as expected. In cmake's documentation[1] it is said that the <MODULE>
parameter is tested through the following formats:
{MODNAME} ... matches any version
{MODNAME}>={VERSION} ... at least version <VERSION> is required
{MODNAME}={VERSION} ... exactly version <VERSION> is required
{MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
Yet, it appears that cmake doesn't throw a warning or error message if I
set {VERSION} with any silly value. It would be nice if it was possible
to throw an error based on that information.
Thanks for the help,
Rui Maciel
[1] http://cmake.org/cmake/help/cmake-2-8-docs.html#module:FindPkgConfig
_______________________________________________
libsigc-list mailing list
libsigc-list@gnome.org
http://mail.gnome.org/mailman/listinfo/libsigc-list