TARGET_LINK_LIBRARIES({$LIBNAME}) is not a correct syntax

 

It does need target (you link your library to some other library or executable, and this library or executable is called target)

 

TARGET_LINK_LIBRARIES(<target> “${LIBNAME}”) should work

 

For example, if you want to link something with mysqld, you add to CMakeLists.txt

TARGET_LINK_LIBRARIES(mysqld “${LIBNAME}”)

 

 

From: Maria-developers [mailto:maria-developers-bounces+wlad=montyprogram.com@lists.launchpad.net] On Behalf Of rg
Sent: Montag, 19. August 2013 01:53
To: maria-developers@lists.launchpad.net
Subject: [Maria-developers] linking an external library

 

Folks,

I want to link an external library for a language extension. After several hours of trying to tell cmake (^%$@*&) to pick it up for linking the library would still not be built with.

CMakeLists.txt in trunk/sql is in the meantime full of pointers to the library without avail.

I did the normal FIND_LIBRARY()

followed by TARGET_LINK_LIBRARIES({$LIBNAME}) on various targets

plus as nothing worked: SET(CMAKE_LIBRARY_PATH) on it, explicity LINK_DIRECTORIES(), SET(CMAKE_PREFIX_PATH), SET(CMAKE_LIBRARY_PATH) ...

How do I link mariadb with an external library??

Thanks Rob