[CMake] Sourceless targets

Michael Wild themiwi at gmail.com
Tue Feb 9 11:28:48 EST 2010


On 9. Feb, 2010, at 17:13 , C. Meissa wrote:

> Hello Lists,
> 
> I have lots of small libraries and sometime it is needed to unify them to a 
> main program library e.g. libtest.so for my test program…
> 
> I tried
> ADD_LIBRARY(test-mainlib SHARED "")
> SET_TARGET_PROPERTIES( test-mainlib PROPERTIES OUPUT_NAME libtest )
> 
> But this does not work due to "Cannot determine link language for target"
> Thanks for your help!
> 
> Best Regards
> C.M.


IMHO this can't possibly work. I assume that you want to create a shared library from a set of static libraries, right? Well, due to the nature of static linking, you'll need a source file that pulls in all the symbols that you want in your final library, otherwise nothing will happen.

What is it exactly you are trying to achieve?


Michael


More information about the CMake mailing list