Hi,
I'm a begginner with CMake.
I've got a project with all sources written and I want to switch to a CMake
building process.
My project is quite small :
- 5 sources in myProject/src directory
- 5 headers in myProject/include directory
The problem is that is need to link with the gsl libraries.
I used the FindGSL.cmake file that I found here
http://www.cmake.org/pipermail/cmake/2006-March/008628.html.
But when I type make, this error occurs :
Linking C executable myExe
i686-apple-darwin9-gcc-4.0.1: `/usr/local/bin/gsl-config: No such file or
directory
make[2]: *** [myExe] Error 1
make[1]: *** [CMakeFiles/myExe.dir/all] Error 2
make: *** [all] Error 2
It's quite strange because the program /usr/local/bin/gsl-config does exist and
prints -L/usr/local/lib -lgsl -lgslcblas -lm.
This is my CMakeLists.txt file :
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(PROJET)
FIND_PACKAGE(GSL REQUIRED)
SET(PROJET_SRCS
./src/FN_functions.c
./src/HH_functions.c
./src/HR_functions.c
./src/Iz_functions.c
./src/main.c
./src/misc.c
./src/ML_functions.c
./src/parsing.c
./src/stim.c
)
SET(INCLUDE_DIRS
${PROJET_SOURCE_DIR}/include
${GSL_INCLUDE_DIRS}
)
SET(LIBS ${LIBS} ${GSL_LIBRARIES})
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
ADD_DEFINITIONS(-Wall -ansi -pedantic -02)
ADD_EXECUTABLE(myExe ${PROJET_SRCS})
TARGET_LINK_LIBRARIES(myExe ${LIBS})
--------------
Do you see the problem ?
_________________________________________________________________
Tchattez en direct en en vidéo avec vos amis !
http://www.windowslive.fr/messenger/_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake