Hello, I have a library which had been installed into my system
under /usr/lib/. When I manually compile it, I must type:
cc -Wall udpcli.c -o cli -lapue
Now, I wrote my cmakelists.txt like this:
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(UDPCS)
FIND_LIBRARY(APUE_LIB, /usr/lib/)
ADD_EXECUTABLE(serv udpserv.c)
ADD_EXECUTABLE(cli udpcli.c)
TARGET_LINK_LIBRARIES(cli, ${APUE_LIB})
And then I encounter the following errors:
$ cmake -DBUILD_TYPE=debug ..
CMake Error: Attempt to add link library "/usr/lib/libapue.so" to target
"cli," which is not built by this project.
-- Configuring done
How can I settle it?
Thanks.
_______________________________________________
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