[CMake] library names

Brandon Van Every bvanevery at gmail.com
Mon Oct 29 13:27:45 EDT 2007


On 10/29/07, Mark Wyszomierski <markww at gmail.com> wrote:
> Hi,
>
> I have a library project named "lib_util".
>
> When using CMake to build the library (with g++), the output file is:
>
>     liblib_util.a
>
> Now another sub project needs to link to that, and has the following
> in CMakeLists.txt:
>
>     target_link_libraries(my_app, lib_util)
>
> but when compiling my_app, it seems somehow to be searching for:
>
>     -llibutil
>
> during linking. How did that naming come about - isn't my
> CMakeLists.txt correct?

Doesn't sound like it.  :-)  Sounds like you have a bug in your code
somewhere.  But if you really think your code is correct and CMake is
the one removing the _ underscore, create a trivial reproducer for the
problem in a few lines of code.  If you've got an ironclad reproducer
then make an entry in the bug tracker http://www.cmake.org/Bug .


Cheers,
Brandon Van Every


More information about the CMake mailing list