Have you tried using &quot;make VERBOSE=1&quot; to get the full command line being executed?<br><br>It looks like `/usr/local/bin/gsl-config might be being passed to the linker via target_link_libraries()?<br>CMake doesn&#39;t evaluate backticks, you&#39;ll have to use a command like execute_process().<br>
<br>There might be a problem in the FindGSL module you&#39;re using.  This might take some debugging with the message() command to trace down.  There are several find modules shipped with CMake 2.6.4 that use a &quot;foo-config&quot; style program to parse include directories and libraries which may be helpful.  One is FindFLTK.cmake for example.<br>
<br><div class="gmail_quote">On Sun, Sep 13, 2009 at 4:05 PM, Benoist Laurent <span dir="ltr">&lt;<a href="mailto:laurentbenoist@hotmail.com">laurentbenoist@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
Hi,<br><br>I&#39;m a begginner with CMake.<br>I&#39;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 <a href="http://www.cmake.org/pipermail/cmake/2006-March/008628.html" target="_blank">http://www.cmake.org/pipermail/cmake/2006-March/008628.html</a>.<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&#39;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="_blank">En savoir plus</a></div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br>