CMake, KF5_INCLUDE_DIRS empty?
Mark
markg85 at gmail.com
Sun Oct 20 15:58:05 UTC 2013
On Sun, Oct 20, 2013 at 11:42 AM, David Faure <faure at kde.org> wrote:
> On Sunday 13 October 2013 17:18:28 Mark wrote:
>> Hi,
>>
>> I used to rely on KF5_INCLUDE_DIRS but since a few days that variable seems
>> to be empty. Did i do something wrong?
>>
>> My CMake file for the relevant parts:
>>
>> find_package(ECM REQUIRED NO_MODULE)
>> set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
>> find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs
>> KBookmarks XmlGui Solid KIO)
>> include_directories(${KF5_INCLUDE_DIRS})
>>
>> KF5_INCLUDE_DIRS used to contain a bunch of paths a few days ago.
>
> I don't know much about this variable, but it shouldn't be needed anyway.
> Just linking to the appropriate targets (e.g. KF5::KBookmarks) should bring in
> the corresponding include dirs.
After hours of CMake debugging i finally found the reason for the
variable to be empty [1].
However, when i add in KIO (or KIOCore) or any known KIO thing i still
am welcomed by by an error that KIO/Job could not be found...
Before the commit [1] i used to just add ${KF5_INCLUDE_DIRS} to my
include dirs which would pick everything up. Right now when i compile
with KIO added like this:
find_package(KF5 MODULE REQUIRED ... KIO ...)
target_link_libraries(project
... other libs ...
kio
kiocore
KF5::KIOCore
KF5::KIOWidgets
)
When compiling it includes some paths, but certainly not the one where
KIO is hidden. I only see:
-I/home/kde-devel/kf5/include
KIO is hidden at:
-I/home/kde-devel/kf5/include/KDE
using kio/job.h as includes works just fine. Using KIO/Job does not.
Do you happen to know a solution here?
[1] http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=1628dccc5ebc665bcee518131d427c4e22c89512
More information about the Kde-frameworks-devel
mailing list