<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>I'm a begginner with CMake.<br>I've got a project with all sources written and I want to switch to a CMake building process.<br>My project is quite small :<br> - 5 sources in myProject/src directory<br> - 5 headers in myProject/include directory<br><br>The problem is that is need to link with the gsl libraries.<br>I used the FindGSL.cmake file that I found here http://www.cmake.org/pipermail/cmake/2006-March/008628.html.<br><br>But when I type make, this error occurs :<br>Linking C executable myExe<br>i686-apple-darwin9-gcc-4.0.1: `/usr/local/bin/gsl-config: No such file or directory<br>make[2]: *** [myExe] Error 1<br>make[1]: *** [CMakeFiles/myExe.dir/all] Error 2<br>make: *** [all] Error 2<br><br>It's quite strange because the program /usr/local/bin/gsl-config does exist and prints -L/usr/local/lib -lgsl -lgslcblas -lm.<br>This is my CMakeLists.txt file :<br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)<br>PROJECT(PROJET)<br><br>FIND_PACKAGE(GSL REQUIRED)<br><br>SET(PROJET_SRCS <br> ./src/FN_functions.c<br> ./src/HH_functions.c<br> ./src/HR_functions.c<br> ./src/Iz_functions.c<br> ./src/main.c<br> ./src/misc.c<br> ./src/ML_functions.c<br> ./src/parsing.c<br> ./src/stim.c<br>) <br><br>SET(INCLUDE_DIRS<br> ${PROJET_SOURCE_DIR}/include<br> ${GSL_INCLUDE_DIRS}<br>)<br><br>SET(LIBS ${LIBS} ${GSL_LIBRARIES})<br><br>INCLUDE_DIRECTORIES(${INCLUDE_DIRS})<br>ADD_DEFINITIONS(-Wall -ansi -pedantic -02)<br>ADD_EXECUTABLE(myExe ${PROJET_SRCS})<br><br>TARGET_LINK_LIBRARIES(myExe ${LIBS})<br><br>--------------<br><br>Do you see the problem ?<br><br><br /><hr />Achetez un nouveau PC et bénéficiez de Windows 7 dès sa sortie ! <a href='http://www.portable-windows.com/' target='_new'>En savoir plus</a></body>
</html>