[CMake] How to handle EXECUTABLE and LIBRARY with the same name?

Filipe Sousa filipe at ipb.pt
Wed Oct 4 08:51:15 EDT 2006


Eric Noulard wrote:
> In my project I have a library
> 
> ADD_LIBRARY(tsp_ascii_writer ${ASCII_WRITER_LIB_SRC})
> 
> and an executable with the same name
> 
> ADD_EXECUTABLE(tsp_ascii_writer ${ASCII_WRITER_SRC})

ADD_EXECUTABLE(tsp_ascii_writer-bin ${ASCII_WRITER_SRC})
SET_TARGET_PROPERTIES(tsp_ascii_writer-bin
  PROPERTIES OUTPUT_NAME tsp_ascii_writer)

> 
> The exe is linked with the library of the same name.
> This is handy since the user may want to use a lib instead
> of the ready to use exe.
> 
> My trouble is the executable and the library do have
> the SAME name and I don't know how to specify that the executable
> depends on the library?
> 
> ADD_DEPENDENCIES(tsp_ascii_writer tsp_ascii_writer)
> does not help.
> 
> Finally my question is, is it possible to handle
> EXECUTABLE
> and
> LIBRARY
> using the same name.
> 


-- 
Filipe Sousa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20061004/002eb2fb/signature.pgp


More information about the CMake mailing list