I think we are generally backwards compatible to 3.5 or some such, so you'll want to use the old call I guess.
FWIW, the more reliable and I think also more liked way of doing this is to configure_file a header where you #cmakedefine WITH_DDCUTI e.g. see plasma-workspace or plasma-desktop. That would of course also eliminate the problem as a whole. On Mon, Sep 30, 2019 at 10:43 PM Dorian Vogel <dorianvo...@gmail.com> wrote: > > Rah that's dicky me trying to add the WITH_DDCUTIL symbol and propagate it to > be used in a #ifdef in the actual code (ddcutilbrightness.{c, h}).... I spent > a lot of time trying to get it to work although it's probably basic cmake > stuff... > > > > Hmm after a bit of research, is it possible that the jenkins uses a Cmake > older than 3.12 ? It seems "add_compile_definitions" was introduced with this > version. > > Related discussion https://github.com/facebookresearch/habitat-sim/issues/137 > > > > The "old" command would be: > > add_definitions(-DWITH_DDCUTIL) > > > > Cheers, > > Dorian > > > > > > On Monday, 30 September 2019 22:27:51 CEST Jonathan Riddell wrote: > > > https://build.neon.kde.org/job/bionic_unstable_kde_powerdevil_bin_amd64/127/ > > > console > > > > > > *17:40:13* CMake Error at CMakeLists.txt:56 > > > (add_compile_definitions):*17:40:13* Unknown CMake command > > > "add_compile_definitions". > > > > > > Is the cmake error I get for Powerdevil > > > > > > > > > https://cgit.kde.org/powerdevil.git/ > > > > > > Jonathan > > > > > > > > > > > > On Mon, 30 Sep 2019 at 21:17, Sanford Rockowitz <rockow...@minsoft.com> > > > > > > wrote: > > > > You might want to look at the launchpad packaging ( > > > > https://launchpad.net/~rockowitz/+archive/ubuntu/ddcutil), which includes > > > > the library version and development package. It is at the current release > > > > level (0.9.7). > > > > > > > > If the cmake error is not obvious, let me know what it is. The locus of > > > > the problem may jump out at me. > > > > > > > > Sanford > > > > > > > > On 9/30/19 9:07 AM, Jonathan Riddell wrote: > > > > > > > > I put ddcutils package in Neon unstable to be able to test it, using > > > > Sanford's packaging from Debian but with the libraries turned on. However > > > > powerdevil doesn't compile with DDCUtils turned on, it fails on a cmake > > > > error. > > > > > > > > Jonathan > > > > > > > > On Fri, 27 Sep 2019 at 07:14, Dorian Vogel <dorianvo...@gmail.com> wrote: > > > >> Hey Jonathan, > > > >> Unfortunately I did not test it for a long time (last time was around > > > >> 5.15), and don't really have the possibility now because I'm away from > > > >> home. *If I remember correctly,* back then I had a few instances when > > > >> the startup of plasma (during the splashscreen) was quite longer due to > > > >> retries of the DDC communication (of course this will not happen if the > > > >> user does not have ddcutil itself installed). As I understand it, this > > > >> is due to the architecture of Powerdevil, which assumes the monitors are > > > >> a fixed configuration as far as brightness is concerned: backends are > > > >> queried at startup and never refreshed. This is why enumeration has to > > > >> happen during startup of plasma, and one would have to restart > > > >> powerdevil when connecting a new DDC capable monitor > > > >> > > > >> Thinking back I wonder if a plasmoid would have been a better way, > > > >> enabling to have the enumeration done after startup is finished, and > > > >> making > > > >> it easier to have a "refresh" button, and would still allow to have both > > > >> an > > > >> integrated screen (laptop) and external (for now the backends in > > > >> powerdevil > > > >> are exclusive). > > > >> > > > >> Considering this is my first contribution and I am not sure of the > > > >> quality, I think some testing from more experienced devs would be > > > >> required. > > > >> I haven't heard much so far. > > > >> > > > >> Cheers, > > > >> *Dorian* > > > >> > > > >> On Thu, Sep 26, 2019 at 11:13 AM Jonathan Riddell <j...@jriddell.org> > > > >> > > > >> wrote: > > > >>> The DDCUtil features of Powerdevil in KDE Plasma are currently disabled > > > >>> by default > > > >>> "DDCUtil library support is disabled by default as recomended by > > > >>> authors, add -DHAVE_DDCUTIL=On to enable" > > > >>> This is based on a conversation from 2017 where it was decided it was > > > >>> unstable. > > > >>> > > > >>> I see work has continued on DDCUtil and on support for it in > > > >>> Powerdevil. Is it ready to be set to on by default? > > > >>> > > > >>> It is too late for Plasma 5.17 due for release in 2 weeks but we can > > > >>> tell distros the message is old as appropriate. > > > >>> > > > >>> Jonathan > > > >> > > > >> -- > > > >> VOGEL Dorian > > > >