LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Cmake, linking libraries (http://www.linuxquestions.org/questions/programming-9/cmake-linking-libraries-717425/)

yfaye 04-07-2009 08:53 AM

Cmake, linking libraries
 
Hi, here are the details of my problem. There is a project A I try to build, using the libraries of another project B. Both A and B will use boost.

Previously I use command line: gcc xx.c ... -L/path/B/lib/ -lB -ldl, which runs fine. Now I need to use cmake to compile A. How should I do it?

Thanks

paulsm4 04-08-2009 06:13 PM

Hi -

With a "makefile", you use "make" syntax to generate a gcc command line.

With "CMake", you'll need to re-write your script to use "CMake" syntax instead.

The "gcc" and link syntax (the "gcc -o myprog -Lmylib" stuff: the final output) remains unchanged.

Here are some resources:

http://www.cmake.org/cmake/help/examples.html
http://www.cmake.org/Wiki/CMake
http://www.vtk.org/Wiki/CMake_FAQ

Good luck .. PSM


All times are GMT -5. The time now is 03:53 AM.