Re: [CMake] target_link_libraries: prefer static to dynamic

2010-01-03 Thread Alexander Neundorf
On Monday 28 December 2009, Bill Hoffman wrote: Pau Garcia i Quiles wrote: I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to happen automagically. That was the whole point of this thread :-) OK, well the thread has a very bad subject then It should be force

Re: [CMake] target_link_libraries: prefer static to dynamic

2010-01-03 Thread Philip Lowman
On Sun, Jan 3, 2010 at 2:26 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: Isn't there some binutil which can tell what kind of library some .lib is ? Or maybe every dll (and that way the accompanying lib) has some functions which only dlls have ? Or maybe they references some special

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-30 Thread Jed Brown
On Mon, 28 Dec 2009 12:29:05 +0100, Pau Garcia i Quiles pgqui...@elpauer.org wrote: I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to happen automagically. That was the whole point of this thread :-) I would argue that FindXXX.cmake is the wrong place for the decision to be

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-30 Thread Michael Wild
On 30. Dec, 2009, at 17:32 , Jed Brown wrote: On Mon, 28 Dec 2009 12:29:05 +0100, Pau Garcia i Quiles pgqui...@elpauer.org wrote: I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to happen automagically. That was the whole point of this thread :-) I would argue that

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-30 Thread Jed Brown
On Wed, 30 Dec 2009 17:51:29 +0100, Michael Wild them...@gmail.com wrote: On 30. Dec, 2009, at 17:32 , Jed Brown wrote: On Mon, 28 Dec 2009 12:29:05 +0100, Pau Garcia i Quiles pgqui...@elpauer.org wrote: I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to happen

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-30 Thread Michael Wild
On 30. Dec, 2009, at 18:02 , Jed Brown wrote: On Wed, 30 Dec 2009 17:51:29 +0100, Michael Wild them...@gmail.com wrote: On 30. Dec, 2009, at 17:32 , Jed Brown wrote: On Mon, 28 Dec 2009 12:29:05 +0100, Pau Garcia i Quiles pgqui...@elpauer.org wrote: I'm using CMake 2.8.0 on Linux. Yes,

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Michael Wild
On 28. Dec, 2009, at 5:38 , Bill Hoffman wrote: Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 6:26 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Michael Wild
On 27. Dec, 2009, at 23:30 , Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 10:16 PM, Michael Wild them...@gmail.com wrote: On 27. Dec, 2009, at 20:41 , Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 10:59 AM, Michael Wild them...@gmail.com wrote: On 26. Dec, 2009, at 17:53 ,

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Pau Garcia i Quiles
What version of CMake are you using?  This should work...  As of 2.6.2 (I think...) CMake uses full paths to libraries, see policy CMP0003: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0003.  It does not matter if there are two libraries in the same directory.  There is no

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Pau Garcia i Quiles
That sounds doable to me. However, you'd need a mechanism to express the same preference when calling find_package and then have find_package communicate that to find_library. Not sure how fine-grained the control should be for FindXXX.cmake modules that find more than one library (or call

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Michael Wild
On 28. Dec, 2009, at 12:40 , Pau Garcia i Quiles wrote: That sounds doable to me. However, you'd need a mechanism to express the same preference when calling find_package and then have find_package communicate that to find_library. Not sure how fine-grained the control should be for

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-28 Thread Bill Hoffman
Pau Garcia i Quiles wrote: I'm using CMake 2.8.0 on Linux. Yes, Michael is right: I want it to happen automagically. That was the whole point of this thread :-) OK, well the thread has a very bad subject then It should be force find_library to choose static over shared. This really has

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Michael Wild
On 26. Dec, 2009, at 17:53 , Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my application needs to link to sqlite), is it possible to tell CMake to link

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Bill Hoffman
Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my application needs to link to sqlite), is it possible to tell CMake to link to the static version of sqlite

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Pau Garcia i Quiles
On Sun, Dec 27, 2009 at 10:59 AM, Michael Wild them...@gmail.com wrote: On 26. Dec, 2009, at 17:53 , Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Pau Garcia i Quiles
On Sun, Dec 27, 2009 at 6:26 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my application needs to link to

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Michael Wild
On 27. Dec, 2009, at 20:41 , Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 10:59 AM, Michael Wild them...@gmail.com wrote: On 26. Dec, 2009, at 17:53 , Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Pau Garcia i Quiles
On Sun, Dec 27, 2009 at 10:16 PM, Michael Wild them...@gmail.com wrote: On 27. Dec, 2009, at 20:41 , Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 10:59 AM, Michael Wild them...@gmail.com wrote: On 26. Dec, 2009, at 17:53 , Pau Garcia i Quiles wrote: Hello, I think this has already

Re: [CMake] target_link_libraries: prefer static to dynamic

2009-12-27 Thread Bill Hoffman
Pau Garcia i Quiles wrote: On Sun, Dec 27, 2009 at 6:26 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Pau Garcia i Quiles wrote: Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my

[CMake] target_link_libraries: prefer static to dynamic

2009-12-26 Thread Pau Garcia i Quiles
Hello, I think this has already been discussed and the answer is negative but still: when I do target_link_libraries to an external library (for instance, my application needs to link to sqlite), is it possible to tell CMake to link to the static version of sqlite instead of the dynamic version?