On 2013-11-19 19:07, Michael DiCuccio wrote:
Suppose you have a library named general:
-----
add_library(general foo bar)
-----
....and then try to link it into an application:
-----
add_executable(myapp baz)
target_link_libraries(myapp general)
-----
cmake complains about the fact that 'general' is a reserved keyword, and I
have found no way to force or finagle linkage against a library named
'libgeneral'.
Name the target something else (e.g. 'libgeneral') and modify its
OUTPUT_NAME? (See set_target_properties and the OUTPUT_NAME property.)
If all you need is to produce a 'libgeneral.so', that may suffice. If
you also need the target name to be 'general'...
--
Matthew
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake