CMake problem with GSL
I try to use the GSL Library with several testcases interesting to see if I compile and link the test using: gcc -Wall -I/usr/local/include -c example.c gcc -Lc:/gsl2.6/lib example.o -lgsl -o example the program compiles and executes ok. If I try to use CMake: (CMAKELists.txt) project(example) Include_ Directories(c:/gsl2.6/include) set(CMAKE_CXX_FLAGS -Wall) add_executable(example main.c) target_links_libraries(example, c:/gsl2.6/lib) CMake execute fails with the message: CMake Error at CMakeLists.txt:8 (target_link_libraries): Cannot specify link libraries for target "example" which is not built by this project.
Any ideas what is wrong / how do I correct the CMakeListss.txt file? Thank you for your kind help