D9404: Fix mingw compile error "src/kdeui/kapplication_win.cpp:212:22: error: 'kill' was not declared in this scope"
Ralf Habacker
noreply at phabricator.kde.org
Wed Dec 20 01:01:04 UTC 2017
habacker added a comment.
In https://phabricator.kde.org/D9404#181209, @dfaure wrote:
> So the if() is needed,
yes,
> the AFTER isn't enough?
I tried that and it does not help - AFTER|BEFORE affects only the order of directories added with include_directories
> I wonder how AFTER works in combination with linking to targets that provide include dirs.
It does not, see the explanations below
1. includes added by target_include_directories
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src/KF5KDELibs4Support_autogen/include
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src/../../..
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/kdecore
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/kdeui
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/kio
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/kssl
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src/kssl
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/kparts
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/src/solid
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src/..
-I/home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0
2. includes added by include_directories are added here (the following is from openssl) BEFORE|AFTER only affects the order here -isystem /usr/i686-w64-mingw32/sys-root/mingw/include
3. includes added by target_link_libraries follows here in the order they are added to the target
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtWidgets
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtGui
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtCore
...
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/qt5/QtTest
4. the following comes from the imported kdewin target
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include/mingw
-isystem /usr/i686-w64-mingw32/sys-root/mingw/include
To get the above mentioned list by yourself you can install osc (https://en.opensuse.org/openSUSE:OSC) on a linux machine and run
osc co home:rhabacker:branches:windows:mingw:win32:KF541/mingw32-kdelibs4support
cd home:rhabacker:branches:windows:mingw:win32:KF541/mingw32-kdelibs4support
osc build
osc chroot
cd /home/abuild/rpmbuild/BUILD/kdelibs4support-5.41.0/build/src
cat CMakeFiles/KF5KDELibs4Support.dir/includes_CXX.rsp | sed 's, ,\n,g' | less
> This looks all a bit hackish,
Not been able to specify include directories in the order the user wants looks to be a cmake limitation and may be fixed there. In KDE4 time this has been solved by using CMAKE_REQUIRED_INCLUDES (see https://cgit.kde.org/kdewin.git/tree/cmake/modules/FindKDEWin.cmake#n76) but this was limited to module based find_package modules I guess.
> but I don't have a better suggestion other than this possible simplification.
1. Someone with win32 api knowledge can remove the kdewin dependencies from kdelibs4support, which required to port kill() and probably other functions to native win32 api - wishlist topic ?
2. making openssl a config based find_package would solve this specific issue too, but only hides the real cause - the cmake limitation in this area.
BTW: After relooking at the patch I saw that I added an obsolate AFTER - will update the patch
REPOSITORY
R239 KDELibs4Support
REVISION DETAIL
https://phabricator.kde.org/D9404
To: habacker, dfaure, ltoscano, bcooksley
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171220/750c967d/attachment.html>
More information about the Kde-frameworks-devel
mailing list