From kde-panel-devel Wed Sep 25 10:32:39 2013 From: Aleix Pol Date: Wed, 25 Sep 2013 10:32:39 +0000 To: kde-panel-devel Subject: Re: Reminder: use KF5::foo instead of ${foo_LIBRARIES} in CMakeLists Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=138010519309328 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0275724609456632495==" --===============0275724609456632495== Content-Type: multipart/alternative; boundary=001a11c3f40000e83304e732c7f8 --001a11c3f40000e83304e732c7f8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Sep 25, 2013 at 11:22 AM, Sebastian K=C3=BCgler wro= te: > CMake-gods, can you confirm the below? (It's inconsistent with my > understanding, and how we've done it in the past months, I'd like to have= a > specialist opinion before going around and changing every single > CMakeLists.txt in Plasma.) > > Thanks, > > -- sebas > > > ---------- Forwarded Message ---------- > > Subject: Reminder: use KF5::foo instead of ${foo_LIBRARIES} in CMakeLists > Date: Wednesday, September 25, 2013, 10:36:46 > From: Martin Gr=C3=A4=C3=9Flin > To: plasma-devel@kde.org > > Hi all, > > just a short reminder. When adjusting a CMakeLists.txt to Qt5 to enable > e.g. a > dataengine please use the new namespace syntax in target_link_libraries. > E.g: > > target_link_libraries(plasma_engine_notifications > Qt5::DBus > KF5::KI18n > KF5::KIconThemes > KF5::KIOCore > KF5::KNotifications > KF5::plasma > KF5::KService > ${KDE4_KNOTIFYCONFIG_LIBRARY} > ) > > and not > > target_link_libraries(plasma_engine_notifications > Qt5::DBus > ${Plasma_LIBRARIES} > ${KI18n_LIBRARIES} > ${KIconThemes_LIBRARIES} > ${KNotifications_LIBRARIES} > ${KService_LIBRARIES} > ${KDE4_KIO_LIBS} > ${KDE4_KNOTIFYCONFIG_LIBRARY} > ) > > I just spent the last half our fixing linker errors as ${KI18n_LIBRARIES= } > didn't exist any more. > > Thanks, > Martin > ----------------------------------------- > -- > sebas > > http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > The *Config.cmake files should be defining both, if that's not the case maybe we should be looking deeper at this issue. Either way, what the definition is, it's (for example): set(KCompletion_LIBRARIES KF5::KCompletion) Personally, I prefer not using the variables, because a typo will make it to run flawlessly but then not working without a warning (because a nonexisting variable resolves to ""). Aleix --001a11c3f40000e83304e732c7f8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, Sep 25, 2013 at 11:22 AM, Sebastian K=C3=BCgler <seba= s@kde.org> wrote:
CMake-gods, can you confirm the below? (It's inconsist= ent with my
understanding, and how we've done it in the past months, I'd like t= o have a
specialist opinion before going around and changing every single
CMakeLists.txt in Plasma.)

Thanks,

-- sebas


---------- =C2=A0Forwarded Message =C2=A0----------

Subject: Reminder: use KF5::foo instead of ${foo_LIBRARIES} in CMakeLists Date: Wednesday, September 25, 2013, 10:36:46
From: Martin Gr=C3=A4=C3=9Flin <mg= raesslin@kde.org>
To: plasma-devel@kde.org

Hi all,

just a short reminder. When adjusting a CMakeLists.txt to Qt5 to enable e.g= . a
dataengine please use the new namespace syntax in target_link_libraries. E.= g:

=C2=A0target_link_libraries(plasma_engine_notifications
=C2=A0 =C2=A0 =C2=A0Qt5::DBus
=C2=A0 =C2=A0 KF5::KI18n
=C2=A0 =C2=A0 KF5::KIconThemes
=C2=A0 =C2=A0 KF5::KIOCore
=C2=A0 =C2=A0 KF5::KNotifications
=C2=A0 =C2=A0 KF5::plasma
=C2=A0 =C2=A0 KF5::KService
=C2=A0 =C2=A0 =C2=A0${KDE4_KNOTIFYCONFIG_LIBRARY}
=C2=A0)

and not

=C2=A0target_link_libraries(plasma_engine_notifications
=C2=A0 =C2=A0 =C2=A0Qt5::DBus
=C2=A0 =C2=A0 ${Plasma_LIBRARIES}
=C2=A0 =C2=A0 ${KI18n_LIBRARIES}
=C2=A0 =C2=A0 ${KIconThemes_LIBRARIES}
=C2=A0 =C2=A0 ${KNotifications_LIBRARIES}
=C2=A0 =C2=A0 ${KService_LIBRARIES}
=C2=A0 =C2=A0 ${KDE4_KIO_LIBS}
=C2=A0 =C2=A0 =C2=A0${KDE4_KNOTIFYCONFIG_LIBRARY}
=C2=A0)

I just spent the last half our fixing linker errors as =C2=A0${KI18n_LIBRAR= IES}
didn't exist any more.

Thanks,
Martin
-----------------------------------------
--
sebas

http://www.kde.org | <= a href=3D"http://vizZzion.org" target=3D"_blank">http://vizZzion.org | = GPG Key ID: 9119 0EF9
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

The *= Config.cmake files should be defining both, if that's not the case mayb= e we should be looking deeper at this issue.

Either way, what the definition is, it= 's (for example):
set(KCompletion_LIBRARIES KF5::KCompletion)

= Personally, I prefer not using the variables, because a typo will make it t= o run flawlessly but then not working without a warning (because a nonexist= ing variable resolves to "").
Aleix
--001a11c3f40000e83304e732c7f8-- --===============0275724609456632495== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0275724609456632495==--