[CMake] How to have a static/shared option in a Find script ?
Michael Hertling
mhertling at online.de
Thu Feb 16 09:50:02 EST 2012
On 02/16/2012 11:10 AM, Barth wrote:
> 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
>> issue you report on will go away.
>>
> Why use DIM_USE_STATIC here, and not DIM_FIND_COMPONENTS ?
> I would think that we get rid of DIM_USE_STATIC if we use components.
Uhhh, yes, you're absolutely right. Of course, with a component-
aware find module, one would request the static library via
FIND_PACKAGE(DIM COMPONENTS static)
instead of DIM_USE_STATIC. In fact, the latter becomes obsolete
and can be dropped. Thanks for the hint, and sorry for not re-
reading my own reply carefully before hitting "Send"... ;-)
Regards,
Michael
More information about the CMake
mailing list