[CMake] /path/to/libpng.so automatic conversion to -lpng ?

Eric Noulard eric.noulard at gmail.com
Thu Jul 13 06:32:19 EDT 2017


2017-07-13 12:07 GMT+02:00 René J. V. Bertin <rjvbertin at gmail.com>:
[...]

>
> >
> > The thing I don't understand is that you use CMake 3.8.2 so you should
> get
> > the new behavior.
>
> Are you sure? I read from the description above that you have to set the
> policy
> explicitly.
>

You are right,
 it depends on the cmake_minimum_required statement you gave.


>
> Do you know if one can set policies like this from the commandline rather
> than
> through patching each toplevel CMakeLists.txt file? Or can it be set for
> just a
> subdirectory?
>

>From the command line I doubt it.
However CMake handles a policy stack:

 https://cmake.org/cmake/help/v3.7/command/cmake_policy.html

so that you can enable the NEW behavior of a policy locally in a particular
CMakeLists.txt or function etc...


> > However since digikam does a cmake_minimum_required(VERSION 3.0.0) which
> may
> > set the CMP0060 to old.
>
> Quite possible, I've run into naggles with that with another policy on Mac
> (25).
> It's annoying that this happens with digikam which is a really cumbersome
> project (it takes ages just to run make just to confirm that everything
> has been
> built).
>

Did you try to use ninja generator instead of make ?
The no-op build is really faster with ninja.

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170713/8b24e6a5/attachment.html>


More information about the CMake mailing list