Review Request 126494: Add cross compile support for desktoptojson.

Ralf Habacker ralf.habacker at freenet.de
Mon Jan 4 15:38:23 UTC 2016



> On Jan. 4, 2016, 3:09 nachm., Aleix Pol Gonzalez wrote:
> > KF5CoreAddonsConfig.cmake.in, line 12
> > <https://git.reviewboard.kde.org/r/126494/diff/1/?file=425586#file425586line12>
> >
> >     What's that property supposed to do? `IMPORTED_LOCATION_NONE`
> 
> Ralf Habacker wrote:
>     If I remember correctly I took it from a different location in the framework code. Better to use IMPORTED_LOCATION ?
> 
> Aleix Pol Gonzalez wrote:
>     Better not use anything. This target should be properly exported already. My impression is that it's not working for you because you have mixed cmake build types.
> 
> Ralf Habacker wrote:
>     Not sure I understand you correctly: 
>     In cross compile environments a host provided desktoptojson executable is required to build kcoreaddons (tested with mingw32). With this patch I can specify -DDESKTOPTOJSON_EXECUTABLE=<host-provided-desktoptojson-executable> on the cmake command line (see https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF516/mingw32-kf5-filesystem/macros.mingw32-kf5?expand=1 line 92ff) to solve this. Also it provides the host provided executable for packages requiring desktoptojson.
> 
> Aleix Pol Gonzalez wrote:
>     But that's not very practical, because you'll have to point to each and every target that it's used. You can consider adopting the `KF5_HOST_TOOLING` variable, which is meant for exactly this.

>From Qt4/KDE4 times providing each tool on the configure command line was the prefered method:

QT4 https://build.opensuse.org/package/view_file/windows:mingw:win32/mingw32-libqt4/macros.mingw32-qt4?expand=1
KDE4 https://build.opensuse.org/package/view_file/windows:mingw:win32/mingw32-kde4-filesystem/macros.mingw32-kde4?expand=1 

For Qt5 related host tool support is provided by using the  CROSS_COMPILE configure switch

configure .... CROSS_COMPILE=<build-target> eg. CROSS_COMPILE=i686-w64-mingw32-

For KF5 now there is the KF5_HOST_TOOLING support, which needs for every host provided tool (currently 8 [1]) to create a related ${KF5_HOST_TOOLING}/<package>/<some-name>Targets.cmake, which points to the related host provided executable ? 

[1] from https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF516/mingw32-kf5-filesystem/macros.mingw32-kf5?expand=1

      -DKCONFIG_COMPILER_EXECUTABLE=/usr/bin/%{_mingw32_target}-kconfig_compiler_kf5 \\
      -DKCONF_UPDATE_EXECUTABLE=/usr/bin/%{_mingw32_target}-kconf_update \\
      -DMEINPROC5_EXECUTABLE=/usr/bin/%{_mingw32_target}-meinproc5 \\
      -DCHECKXML5_EXECUTABLE=/usr/bin/%{_mingw32_target}-checkXML5 \\
      -DDOCBOOKL10NHELPER_EXECUTABLE=/usr/bin/%{_mingw32_target}-docbookl10nhelper \\
      -DDESKTOPTOJSON_EXECUTABLE=/usr/bin/%{_mingw32_target}-desktoptojson \\
      -DPARSETRIGRAMS_EXECUTABLE=/usr/bin/%{_mingw32_target}-parsetrigrams \\
      -DKATEHIGHLIGHTINGINDEXER_EXECUTABLE=/usr/bin/%{_mingw32_target}-katehighlightingindexer \\

A scan of kf5 git repos show me only three references to KF5_HOST_TOOLING, which looks incomplete

./kconfig/KF5ConfigConfig.cmake.in:9:if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
./kconfig/KF5ConfigConfig.cmake.in:10:    find_file(KCONFIGCOMPILER_PATH KF5Config/KF5ConfigCompilerTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
./kconfig/KF5ConfigConfig.cmake.in-11-    include("${KCONFIGCOMPILER_PATH}")
  -> should KCONFIGCOMPILER_PATH not better TARGETSFILE similar to the other locations 
  -> KF5ConfigCompilerTargets.cmake: does it include all required tools for package KF5Config or simple for KCONFIGCOMPILER
  -> if KF5Config related it should be named KF5ConfigToolsTarget.cmake similar to the other

./kauth/KF5AuthConfig.cmake.in:17:    if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
./kauth/KF5AuthConfig.cmake.in:18:        find_file(TARGETSFILE KF5Auth/KF5AuthToolsTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
./kauth/KF5AuthConfig.cmake.in-19-        include("${TARGETSFILE}")


./kcoreaddons/KF5CoreAddonsConfig.cmake.in:6:if(CMAKE_CROSSCOMPILING AND KF5_HOST_TOOLING)
./kcoreaddons/KF5CoreAddonsConfig.cmake.in:7:    find_file(TARGETSFILE KF5CoreAddons/KF5CoreAddonsToolingTargets.cmake PATHS ${KF5_HOST_TOOLING} ${CMAKE_CURRENT_LIST_DIR} NO_DEFAULT_PATH)
   -> KF5CoreAddonsToolingTargets.cmake not better KF5CoreAddonsToolsTargets.cmake
./kcoreaddons/KF5CoreAddonsConfig.cmake.in-8-    include("${TARGETSFILE}")


Unfortunally I did not found an example set for the structure of such cmake files (any howto available ?)


- Ralf


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126494/#review90552
-----------------------------------------------------------


On Jan. 4, 2016, 3:11 nachm., Ralf Habacker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126494/
> -----------------------------------------------------------
> 
> (Updated Jan. 4, 2016, 3:11 nachm.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> Add cross compile support for desktoptojson.
> 
> 
> Diffs
> -----
> 
>   KF5CoreAddonsConfig.cmake.in dce3a4e65599b286d8fedbaa20235f5025f509e8 
> 
> Diff: https://git.reviewboard.kde.org/r/126494/diff/
> 
> 
> Testing
> -------
> 
> Cross compiled package has been build at https://build.opensuse.org/package/show/home:rhabacker:branches:windows:mingw:win32:KF516/mingw32-kcoreaddons
> 
> 
> Thanks,
> 
> Ralf Habacker
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160104/1695fb10/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list