[CMake] How to link a .so file under linux?

Andy Cedilnik andy.cedilnik at kitware.com
Fri Oct 29 12:54:00 EDT 2004


Hi Ning,

Two options:

1. Just do TARGET_LINK_LIBRARIES(program /path/to/library.so)

2. Better one is to:

 FIND_LIBRARY(MY_LIB NAMES library
              PATHS /path/to)
 TARGET_LINK_LIBRARIES(program ${MY_LIB})

			Andy

On Fri, 2004-10-29 at 10:19, Ning Cao wrote:
>     I want to link a .so file (provided by others) to my executable file.
>     Could anyone tell me how to do this with CMake?




More information about the CMake mailing list