Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-20 Thread Barth
Hello, Thank you very much for your message. You have been very helpful. Best regards, Barth On 02/16/2012 05:18 PM, Michael Hertling [via CMake] wrote: On 02/16/2012 03:14 PM, Barth wrote: Hi again, I have understood what you meant :) Hhm, actually, I talked nonsense w.r.t.

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Barth
Hello again, A short question about your proposal : Michael Hertling wrote (4) DIM_USE_STATIC decides if DIM_LIBRARIES receives DIM_STATIC_LIBRARY or DIM_SHARED_LIBRARY, and because DIM_LIBRARIES is not cached, it can be set anew each time FIND_PACKAGE(DIM ...) is called, so the

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Barth
Hi again, I have understood what you meant :) For records here is what I did : Thank you again for your supprot, Best regards, Barth -- View this message in context: http://cmake.3232098.n2.nabble.com/How-to-have-a-static-shared-option-in-a-Find-script-tp7287655p7291050.html Sent from the

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Barth
Hi again, I have understood what you meant :) For records here is what I did : # (1) Use FIND_LIBRARY() to look for the shared and the static library # and define DIM_SHARED_LIBRARY and DIM_STATIC_LIBRARY in the cache. find_library(DIM_STATIC_LIBRARY NAMES libdim.a PATHS $ENV{DIMDIR}

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-16 Thread Michael Hertling
On 02/16/2012 03:14 PM, Barth wrote: Hi again, I have understood what you meant :) Hhm, actually, I talked nonsense w.r.t. DIM_USE_STATIC. ;) For records here is what I did : # (1) Use FIND_LIBRARY() to look for the shared and the static library # and define DIM_SHARED_LIBRARY and

[CMake] How to have a static/shared option in a Find script ?

2012-02-15 Thread Barth
Hello, I am trying to write a Find script for a library called DIM. It is something basic but I have a problem with caching. I have an option to force choosing the static library over the shared one : Then, I decide what is the name of the library to search depending on DIM_USE_STATIC and I

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-15 Thread Michael Hertling
On 02/15/2012 03:48 PM, Barth wrote: Hello, I am trying to write a Find script for a library called DIM. It is something basic but I have a problem with caching. I have an option to force choosing the static library over the shared one : Then, I decide what is the name of the library to

Re: [CMake] How to have a static/shared option in a Find script ?

2012-02-15 Thread Barth
Hello, A great thanks for your extensive reply ! I am going to implement the clean approach following your advices. Best regards, Barth On 02/16/2012 12:47 AM, Michael Hertling [via CMake] wrote: On 02/15/2012 03:48 PM, Barth wrote: Hello, I am trying to write a Find script for a