PDA

View Full Version : CMake , anyone?



StOoZ
September 7th, 2008, 08:57 PM
I want to distribute my app , now I decided to go with cmake , any good tutorial for it?
the docs on the site arent that good, search on google , but found nothing really helpful.

LaRoza
September 7th, 2008, 10:12 PM
I want to distribute my app , now I decided to go with cmake , any good tutorial for it?
the docs on the site arent that good, search on google , but found nothing really helpful.

Without telling us what you had problems with, you'll only get more tutorials, likely the ones you found because most of us use google also.

http://www.cmake.org/Wiki/CMake

StOoZ
September 7th, 2008, 10:36 PM
ok , for a start , the FIND_LIBRARY doesnt work for me , even though I have these libaries...
I did that :


MESSAGE( STATUS "Looking for quux")

FIND_LIBRARY (ALUT_LIBRARY alut /usr/local/lib /usr/lib /sw/lib)


IF (ALUT_LIBRARY)
MESSAGE( STATUS "Looking for quux - found")
ELSE (ALUT_LIBRARY)
MESSAGE( FATAL_ERROR "Looking for quux - not found")
ENDIF ( ${ALUT_LIBRARY} )


no sources , its only for testing , now I run it with cmake TEST

where the CMakeLists.txt is in the TEST DIR.
and it doesnt find the libs....
any idea why?

hod139
September 8th, 2008, 03:04 PM
For FIND_LIBRARY, try:


FIND_LIBRARY(ALUT_LIBRARY
NAMES alut
PATHS
/usr/local/lib
/usr/lib
/sw/lib)


EDIT: I should add, this is looking for a file called libalut.so in one of the paths. Your message stated that it is looking for quuz, so I just wanted to clarify what the find_library is looking for.

SeanHodges
September 9th, 2008, 12:18 PM
Did hod139's suggestion help you?

See http://manpages.ubuntu.com/manpages/hardy/man1/cmake.html and search the page for FIND_LIBRARY. There is some detailed documentation on how to use it there.

Or if you want to read it off-line, type: "man cmake"

Jahocolips
July 12th, 2010, 02:22 AM
I case anyone else comes across this, I just wrote a tutorial I think is pretty helpful. http://mathnathan.com/2010/07/11/getting-started-with-cmake/