Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Could not find a package configuration file provided by "ECM" with any of the following names: ECMConfig.cmake ecm-config.cmake Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR" to a directory containing one of the above files.



  • Hi,
    I have tried to clone a repository of KDE. But apparently it requires Extra Cmake Modules. I currently use windows 10 and cannot sudo install ECM as on Ubuntu. I have downloaded the extra Cmake modules from git and also tried to edit CMakelists.txt like
    find_package(ECM REQUIRED NO_MODULE)
    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
    after copying the ECM folder into the repository folder. But not working.Please can anyone suggest me in simple terms of what to do.
    I am sorry if seems like a stupid question, but I could not find any resource anywhere for windows users.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's a question you should bring to the KDE folks.

    In any case, if my memory serves well, that module follows the same logic as the others, use cmake to install it on your system and then you should be able to use it as other KDE modules.

    Note that if you require KDE modules, IIRC, there's a project called craft that should help you build things on Windows.



  • This post is deleted!


  • Hi, I have used cmake to build and saved the ECM modules binaries using Ninja (Generator) into the application folder. This has solved the aforesaid error. But still the project does not load further than cmakeLists.txt . There are no subdirectories visible.There is no. pro file as such which can be directly opened. ![screenshot](121.JPG image url)

    When other projects are opened, the project tree is clearly visible. But not here. The issues pane is clear. Any assistance will be vital.


  • Qt Champions 2019

    @anubhav360 Please check the CMake log - apparently CMake fails to parse your project files.



  • Thanks for replying. Here are the texts for

    1. General Message pane when the project is opened:

    Running Windows Runtime device detection.
    F:\Qt\5.14.0\winrt_x86_msvc2017\bin\winrtrunner.exe --list-devices
    Running Windows Runtime device detection.
    F:\Qt\5.14.0\winrt_x86_msvc2017\bin\winrtrunner.exe --list-devices
    Running Windows Runtime device detection.
    F:\Qt\5.14.0\winrt_x86_msvc2017\bin\winrtrunner.exe --list-devices
    2020-03-10T01:53:39 Clang Code Model: Error: The clangbackend executable "F:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
    Found 2 Windows Runtime devices.
    Found 2 Windows Runtime devices.
    Found 2 Windows Runtime devices.
    Running F:\Qt\Tools\CMake_32\bin\cmake.exe "C:/Users/Anubhav Sharma/Documents/cantor" "-GCodeBlocks - Ninja" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/HostX64/x86/cl.exe" "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/HostX86/x86/cl.exe" "-DCMAKE_PREFIX_PATH:STRING=" "-DQT_QMAKE_EXECUTABLE:STRING=" in C:\Users\Anubhav Sharma\AppData\Local\Temp\QtCreator-TCBsRQ\qtc-cmake-jlzQAWQH.
    Running F:\Qt\Tools\CMake_32\bin\cmake.exe "C:/Users/Anubhav Sharma/Documents/cantor" "-GCodeBlocks - Ninja" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_CXX_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/HostX64/x86/cl.exe" "-DCMAKE_C_COMPILER:STRING=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/HostX86/x86/cl.exe" "-DCMAKE_PREFIX_PATH:STRING=" "-DQT_QMAKE_EXECUTABLE:STRING=" in C:\Users\Anubhav Sharma\AppData\Local\Temp\QtCreator-TCBsRQ\qtc-cmake-jlzQAWQH.
    -- WARNING: skipping tests that require PyQt
    -- The following features have been enabled:

    • BUILD_HTML_DOCS, Generate HTML documentation for installed modules.
    • BUILD_MAN_DOCS, Generate man page documentation for installed modules.
    • BUILD_TESTING, Build automated tests.

    -- The following OPTIONAL packages have been found:

    • Sphinx (required version >= 1.2), Tool to generate documentation., http://sphinx-doc.org/
      Required to build documentation for Extra CMake Modules.
    • QCollectionGenerator, Qt help collection generator., https://www.qt.io/
      Required to build Extra CMake Modules documentation in Qt Help format.
    • Qt5LinguistTools, Qt5 linguist tools., https://www.qt.io/
      Required to run tests for the ECMPoQmTools module.
    • Qt5Core, Qt5 core library., https://www.qt.io/
      Required to run tests for the ECMQtDeclareLoggingCategory module, and for some tests of the KDEInstallDirs module.
    • Qt5Gui (required version >= 5.9.7)
    • Qt5Network (required version >= 5.9.7)
    • Qt5Qml (required version >= 5.9.7)
    • Qt5Quick, Qt5 Quick library., https://www.qt.io/
      Required to run tests for the ECMQMLModules module.

    -- The following features have been disabled:

    • BUILD_QTHELP_DOCS, Generate QtHelp documentation for installed modules.

    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/Anubhav /Documents/cantor


    2)CMakeOutput .txt :-

    The system is: Windows - 10.0.18362 - AMD64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/HostX86/x86/cl.exe
    Build flags:
    Id flags:

    The output was:
    0
    Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
    Copyright (C) Microsoft Corporation. All rights reserved.

    CMakeCCompilerId.c
    Microsoft (R) Incremental Linker Version 14.22.27905.0
    Copyright (C) Microsoft Corporation. All rights reserved.

    /out:CMakeCCompilerId.exe
    CMakeCCompilerId.obj

    Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe"

    Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.obj"

    The C compiler identification is MSVC, found in "F:/cantor/CMakeFiles/3.16.0/CompilerIdC/CMakeCCompilerId.exe"

    Determining if the C compiler works passed with the following output:
    Change Dir: F:/cantor/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/PROGRA~2/MICROS~1/2019/ENTERP~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_91a84 && [1/2] Building C object CMakeFiles\cmTC_91a84.dir\testCCompiler.c.obj

    [2/2] Linking C executable cmTC_91a84.exe

    Detecting C compiler ABI info compiled with the following output:
    Change Dir: F:/cantor/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/PROGRA~2/MICROS~1/2019/ENTERP~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe cmTC_eeb57 && [1/2] Building C object CMakeFiles\cmTC_eeb57.dir\CMakeCCompilerABI.c.obj

    [2/2] Linking C executable cmTC_eeb57.exe


    Any idea where the things are going wrong and possible solutions would be extremely helpful.


  • Lifetime Qt Champion

    Since Cantor is part of KDE, did you took a look at Craft to build it ?



  • @SGaist .So I took your advice, and used craft to build it instead . Everything looks super cool, until i encounter this .
    ps.JPG

    The notification says Building Cantor failed. Any idea as to whats going wrong here.


  • Lifetime Qt Champion

    Are you building within an Anaconda environment ?



  • No. I am not explicitly building in Anaconda environment but I have Anaconda installed. Cantor requires a lot of python dependencies , it sort of started referring to Anaconda directories by default when I ran Install command in Craft. Thanks for bearing with me till now,any solutions here?


  • Lifetime Qt Champion

    What python library do you have there ?



  • The .lib files are:-
    _tkinter.lib
    python3.lib
    python37.lib


  • Lifetime Qt Champion

    It's not the same python version between the screenshot and the current code.


Log in to reply