Re: [CMake] target_link_libraries doubt
Vikas Kumar wrote: I understand that it is currently not possible. But take the case where you as a software product developer, are given a proprietary .dll/.so file and you are creating a library that links with that file. If "ld -o foo.so -static bar.so foo.o " , can be written in a makefile and made to work, why cannot cmake have such an option ? Look at the value of the variables CMAKE_C_CREATE_SHARED_LIBRARY and CMAKE_CXX_CREATE_SHARED_LIBRARY. You can set it yourself to change the rule. -Brad ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] target_link_libraries doubt
I understand that it is currently not possible. But take the case where you as a software product developer, are given a proprietary .dll/.so file and you are creating a library that links with that file. If "ld -o foo.so -static bar.so foo.o " , can be written in a makefile and made to work, why cannot cmake have such an option ? Vikas On 6/14/06, Alexander Neundorf <[EMAIL PROTECTED]> wrote: Von: Vikas Kumar <[EMAIL PROTECTED]> > Hi > I have a library that links to other shared libraries. For example I > am trying to build libFoo.so , which links to a shared library > libBar.so. > How do i link in libBar.so statically instead ? > is there a way to do that like by saying "-static " just before > libBar.so > This way I will have to worry about distributing one library instead of > two. I think this is not possible. You either have to build and distribute two libraries, or simply put everything in one library. Having the source files in different directories is no problem. Bye Alex -- "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] target_link_libraries doubt
Von: Vikas Kumar <[EMAIL PROTECTED]> > Hi > I have a library that links to other shared libraries. For example I > am trying to build libFoo.so , which links to a shared library > libBar.so. > How do i link in libBar.so statically instead ? > is there a way to do that like by saying "-static " just before > libBar.so > This way I will have to worry about distributing one library instead of > two. I think this is not possible. You either have to build and distribute two libraries, or simply put everything in one library. Having the source files in different directories is no problem. Bye Alex -- "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] target_link_libraries doubt
Hi I have a library that links to other shared libraries. For example I am trying to build libFoo.so , which links to a shared library libBar.so. How do i link in libBar.so statically instead ? is there a way to do that like by saying "-static " just before libBar.so This way I will have to worry about distributing one library instead of two. Here is a view of my cmake file. ADD_LIBRARY(Foo Foo.cpp) TARGET_LINK_LIBRARIES(Foo Bar) Any help will be appreciated. Thanks Vikas ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake