Error when generating CMake configuration on Windows

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Error when generating CMake configuration on Windows

Post by hsnam »

Hi everyone, I had this problem when trying to generate CMake configuration:

Image

Full error message here:

Code: Select all

CMake Warning at CMakeLists.txt:864 (find_package):
  By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Network", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Network" with
  any of the following names:

    Qt5NetworkConfig.cmake
    qt5network-config.cmake

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


CMake Warning at CMakeLists.txt:865 (find_package):
  By not providing "FindQt5Xml.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Xml", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Xml" with any
  of the following names:

    Qt5XmlConfig.cmake
    qt5xml-config.cmake

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


CMake Warning at CMakeLists.txt:867 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

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


CMake Warning at CMakeLists.txt:868 (find_package):
  By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5PrintSupport", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5PrintSupport"
  with any of the following names:

    Qt5PrintSupportConfig.cmake
    qt5printsupport-config.cmake

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


CMake Warning at CMakeLists.txt:869 (find_package):
  By not providing "FindQt5OpenGL.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5OpenGL", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5OpenGL" with
  any of the following names:

    Qt5OpenGLConfig.cmake
    qt5opengl-config.cmake

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


CMake Warning at CMakeLists.txt:870 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

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


CMake Warning at CMakeLists.txt:871 (find_package):
  By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5UiTools", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5UiTools" with
  any of the following names:

    Qt5UiToolsConfig.cmake
    qt5uitools-config.cmake

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


CMake Warning at CMakeLists.txt:872 (find_package):
  By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Network", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Network" with
  any of the following names:

    Qt5NetworkConfig.cmake
    qt5network-config.cmake

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


CMake Warning at CMakeLists.txt:873 (find_package):
  By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5Concurrent", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Concurrent"
  with any of the following names:

    Qt5ConcurrentConfig.cmake
    qt5concurrent-config.cmake

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


CMake Warning at CMakeLists.txt:875 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

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


CMake Error at CMakeLists.txt:880 (MESSAGE):
  ========================

  Qt5 libraries not found.

  ========================
I'm using CMake 3.14.7, Python 3.6.8 and following this guide: https://www.freecadweb.org/wiki/CompileOnWindows

I searched for some solutions but still failed to compile. Do you have any idea how to fix it?

Thanks in advanced!
Last edited by hsnam on Thu Nov 14, 2019 2:36 am, edited 3 times in total.
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: Error when generate CMake configuration

Post by chrisb »

Hi and welcome to the forum!

Please edit your post and put the output in code tags </> for improved readablity.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Re: Error when generating CMake configuration on Windows

Post by hsnam »

Oh sorry, I edited the post
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Error when generating CMake configuration on Windows

Post by uwestoehr »

hsnam wrote: Wed Nov 13, 2019 8:52 am Hi everyone, I had this problem when trying to generate CMake configuration:
I cannot reproduce the problem. It is normal that the first configuration failed. As I wrote in the Wiki, you must subsequently set the path to FREECAD_LIBPACK_DIR and also explicitly set the option BUILD_QT5 in the CMake GUI. Then run Configure again.

Edit: Note you need a different LibPack, depending if you want to compile FC 0.19 (Git master) of FC 0.18.
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Re: Error when generating CMake configuration on Windows

Post by hsnam »

uwestoehr wrote: Thu Nov 14, 2019 12:23 pm I cannot reproduce the problem. It is normal that the first configuration failed. As I wrote in the Wiki, you must subsequently set the path to FREECAD_LIBPACK_DIR and also explicitly set the option BUILD_QT5 in the CMake GUI. Then run Configure again.

Edit: Note you need a different LibPack, depending if you want to compile FC 0.19 (Git master) of FC 0.18.
Thank for your reply,

Sorry for not providing enough information, I did change the value of FREECAD_LIBPACK_DIR and BUILD_QT5 follow your Wiki before. Here are my settings:

Image

Image

My target is to build a stable version of FreeCAD (0.18) for Windows 64bit, and I'm using the LibPack FreeCADLibs_11.11_x64_VC12.7z, build on Visual Studio 2013.

I also tried on other computers but the result still the same.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Error when generating CMake configuration on Windows

Post by uwestoehr »

hsnam wrote: Fri Nov 15, 2019 1:58 am My target is to build a stable version of FreeCAD (0.18) for Windows 64bit, and I'm using the LibPack FreeCADLibs_11.11_x64_VC12.7z, build on Visual Studio 2013.
Please attach the relevant info like the output in the logfiles.
Otherwise it is just guessing. Obviously Cmake cannot find Qt. The question is if you maybe installed Qt incompletely. Or you are using a too new Qt version because the LibPack for 0.18 was released in April 2018, a year before FC 0.18 was finished. So maybe the LibPack for FC 0.18 requires a Qt version that was actual in 2018.

However, instead if fiddling around, let's try to compile FreeCAD's master using MSVC 2017 or newer. The Wiki page and also the current LibPack are tested well for this. So when you succeed in compiling the current master, everyting is in shape on your PC. Then we can investigate why you cannot compile FC 0.18.

Btw. why do you need to compile FC 0.18?
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Re: Error when generating CMake configuration on Windows

Post by hsnam »

I attached the error log files, please take a look.

The question is if you maybe installed Qt incompletely
I don't see any mention about Qt installation in your Wiki, so I didn't install that library.
Is this the installer of Qt5: https://doc.qt.io/qt-5/windows.html

Btw. why do you need to compile FC 0.18?
You said that 0.19 is the latest development version so I think 0.18 is the stable version, that why I want to build a 0.18 version.
Do I misunderstood your mean?

BTW, I will try to build 0.19 version follow your recommendations and see if it can works around.

Thank you so much for your quick response.
Attachments
CMakeOutput.log
(14.47 KiB) Downloaded 100 times
CMakeError.log
(1.2 KiB) Downloaded 99 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Error when generating CMake configuration on Windows

Post by vocx »

hsnam wrote: Fri Nov 15, 2019 3:20 am ...
I don't see any mention about Qt installation in your Wiki, so I didn't install that library.
...
The LibPack should contain the most recent version of Qt. So you should be using the latest LibPack.
...
You said that 0.19 is the latest development version so I think 0.18 is the stable version, that why I want to build a 0.18 version.
...
But you don't need to build the 0.18 version. It is already built, prepackaged, and ready to use. If you want to compile it yourself, then keep heeding the advice from uwe, but otherwise just get the installable package, or portable version from Download.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Re: Error when generating CMake configuration on Windows

Post by hsnam »

vocx wrote: Fri Nov 15, 2019 3:42 am The LibPack should contain the most recent version of Qt. So you should be using the latest LibPack.

But you don't need to build the 0.18 version. It is already built, prepackaged, and ready to use. If you want to compile it yourself, then keep heeding the advice from uwe, but otherwise just get the installable package, or portable version from Download.
I know that there are built versions of FreeCAD, but I want to use a modified one so I have to build by my own.

BTW, thank for your help.
hsnam
Posts: 13
Joined: Wed Nov 13, 2019 4:36 am

Re: Error when generating CMake configuration on Windows

Post by hsnam »

uwestoehr wrote: Fri Nov 15, 2019 2:18 am However, instead if fiddling around, let's try to compile FreeCAD's master using MSVC 2017 or newer. The Wiki page and also the current LibPack are tested well for this. So when you succeed in compiling the current master, everyting is in shape on your PC. Then we can investigate why you cannot compile FC 0.18.
I built a 0.19 version (master branch on Git) follow your recommendations and it was done without any error.
I compiled a ready-to use FreeCAD with the target INSTALL.

But when I executed the FreeCAD.exe file in the bin folder, there're some errors happened:

Image

Image

Image

Image

Do I need to install something else to make it works?
Post Reply