Bug 386776 - using QtSDK doesn't work on Windows
Summary: using QtSDK doesn't work on Windows
Status: RESOLVED NOT A BUG
Alias: None
Product: Craft
Classification: Developer tools
Component: Core (show other bugs)
Version: master
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 15:10 UTC by Uwe Stöhr
Modified: 2017-11-12 23:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stöhr 2017-11-12 15:10:35 UTC
I set up Craft from scratch following the guidelines in
https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source/Windows

Since I have already Qt 5.9l.2 installed because I need it for other non-KDE project, I want to use the prebuild Qt libraries from this installation.

In my craftsettings.ini and have therefore now this:

[QtSDK]
## For advanced users only
## Whether to use prebuild Qt binaries.
Enabled = True
## The path to the Qt sdk.
Path = C:\Qt\Qt5.9.2\5.9.2\msvc2015_64\bin
## The version of Qt.
Version = 5.9.2
## The compiler version, if you are not sure what to use, have a look into the derectory set in QtSDK/Path.
## The compiler must be of the same type as General/KDECOMPILER.
## If you are using mingw please make sure you have installed the mingw using the Qt installer.
Compiler = msvc2015_64

But when I now use e.g. the command
craft karchive
I get this error:
  Could not find a package configuration file provided by "Qt5" (requested
  version 5.7.0) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.

But in the path I specified:
C:\Qt\Qt5.9.2\5.9.2\msvc2015_64\bin
there is the Qt5Config.cmake

So either I made a mistake or setting the Qt doesn't work as it should.
Comment 1 Uwe Stöhr 2017-11-12 15:30:17 UTC
OK, since
C:\Qt\Qt5.9.2\5.9.2\msvc2015_64\bin
might not be correct, I tried now

- C:\Qt

-> doesn't work

C:\Qt\Qt5.9.2

This works!

So to fix this bug, could you please document in
https://community.kde.org/Craft
that the path to Qt has to be

C:\Qt\Qtx.y.z
Comment 2 Uwe Stöhr 2017-11-12 15:35:29 UTC
The bug is not completely fixed. Now I can e.g. successfully compile

craft karchive
craft kconfig
...

but

craft ki18n

fails with

CMake Error at CMakeLists.txt:36 (find_package):
  Could not find a package configuration file provided by "Qt5Script"
  (requested version 5.7.0) with any of the following names:

    Qt5ScriptConfig.cmake
    qt5script-config.cmake

  Add the installation prefix of "Qt5Script" to CMAKE_PREFIX_PATH or set
  "Qt5Script_DIR" to a directory containing one of the above files.  If
  "Qt5Script" provides a separate development package or SDK, be sure it has
  been installed.
Comment 3 Uwe Stöhr 2017-11-12 16:17:19 UTC
> (requested version 5.7.0) with any of the following names:

    Qt5ScriptConfig.cmake

Now I understand, Qt5Script is deprecated since Qt 5.6. So should i report this to the ki18n project?
Comment 4 Hannah von Reth 2017-11-12 17:19:42 UTC
No just install it, there is an option for that in the installer.
In case you want the best and easiest outcome, don't use the SDK mode and let craft build Qt with all needed dependencies.
Comment 5 Uwe Stöhr 2017-11-12 19:43:58 UTC
> No just install it, there is an option for that in the installer.

I did meanwhile but I thought that a deprecated package should no longer be used.

However, could you please document in
https://community.kde.org/Craft
that the path to Qt has to be

C:\Qt\Qtx.y.z

Then I would treat this bug report as resolved.

Many thanks for your help.