Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › cmake felgo

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #22116

    Didier

    Hi. can i use felo with cmake? If so, how can I do it?

    #22125

    Alex
    Felgo Team
    #23621

    NgapWei

    Could you show us some(or a) working example(s)  with cmake please?Like how could we find the module of felgo?How could we link to them?Any felgo app build with cmake which could deploy to android or ios? Do you ever test?

     

    Example:

    find_package(Qt5 COMPONENTS REQUIRED Core Gui Widgets Multimedia Concurrent Network Sql Felgo????)

    target_link_libraries(Qt5::Feglo?????)

     

    Examples of Qt using cmake is not that many already compare with qmake, example of using felgo with cmake is even rare, this may seem easy for you because you are the developers, but for users, we have no idea what is the proper solution to link felgo with cmake, what should the name of Qt5::???? called? Just felgo?Or Felgo?Or FELGO?What about another plugin?How do we specify “assetsFolder.source” etc.

     

    Thanks

    #23622

    NgapWei

    By the way, Qt6 is going to adopt cmake instead of qmake, I think it is worth to invest on the documentation on cmake too.

    #23642

    Alex
    Felgo Team
    #23649

    NgapWei

    Thanks for the example 🙂

    #23730

    Ephesiel

    Hello there,

    When I try to compile the FelgoLiveExample on QtCreator (Felgo version), I’ve got an error on the line

    find_package(Felgo REQUIRED)
    CMake Error at CMakeLists.txt:30 (find_package):
      By not providing "FindFelgo.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "Felgo", but
      CMake did not find one.
    
      Could not find a package configuration file provided by "Felgo" with any of
      the following names:
    
        FelgoConfig.cmake
        felgo-config.cmake
    
      Add the installation prefix of "Felgo" to CMAKE_PREFIX_PATH or set
      "Felgo_DIR" to a directory containing one of the above files.  If "Felgo"
      provides a separate development package or SDK, be sure it has been
      installed.

    When I check on qt creator > help > about plugins, I have “Felgo Getting Started” and “Felgo Live” plugins well installed
    If it can help I’m on Windows

    #23733

    Ephesiel

    So I found that my error was due to the CMAKE_PREFIX_PATH variable which was pointing to the Qt directory and not the Felgo Directory

    set(CMAKE_PREFIX_PATH "C:/Felgo/Felgo/mingw_32")

    This line allows me to build cmake.
    Now I’m building my project and got the error

    C:\Felgo\Felgo\mingw_32\include\Felgo\felgoliveclient.h:6: erreur : QApplication: No such file or directory

    QApplication is on the Qt::Widgets library so, I include it as well :

    find_package(Qt5 COMPONENTS Core Quick Widgets REQUIRED)
    target_link_libraries(QtQuickFelgoLiveExample PRIVATE Qt5::Core Qt5::Quick Qt5::Widgets Felgo FelgoLive)

    But when I compile I got this error which is a make error and is realy strange…

    No rule to make target 'Felgo-NOTFOUND', needed by 'QtQuickFelgoLiveExample.exe'.  Stop.

    I’m new to CMake and Felgo but this Behavior is strange isn’t it ?
    In the same way, some of CMake commands do not work on Felgo Client but works on Qt Creator, like source_group(TREE … ) which has a weird behavior on Felgo Client…

    What’s wrong ? I just download the Felgo client and The Github package given by Alex.
    I tried on Qt Creator and the error was exactly the same

    #24891

    Cezary

    I have CMake errors right after clone QtQuickFelgoLiveExample-CMake example.
    My setup:
    Ubuntu Studio 22.10
    Qt standalone install in ~/Qt – ver 5.15.2 with Felgo plugin from Marketplace

    error:
    CMake Error at CMakeLists.txt:30 (find_package):
    By not providing “FindFelgo.cmake” in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by “Felgo”, but
    CMake did not find one.

     

    If I add suggested dirs
    set(Felgo_DIR ~/Qt/5.15.2/gcc_64/lib/cmake/Felgo/)
    set(Qt5Multimedia_DIR ~/Qt/5.15.2/gcc_64/lib/cmake/Qt5Multimedia/)
    error is:

    CMake Error in CMakeLists.txt:
    IMPORTED_LOCATION not set for imported target “Felgo” configuration
    “Debug”.

    CMake Error in CMakeLists.txt:
    IMPORTED_LOCATION not set for imported target “FelgoLive” configuration
    “Debug”.

     

    I think this is related with my Qt/Felgo configuration rather than with yours example project, but I think it can be (and should be) fixed with some conditional commands in CMake, because I have all components installed (qmake project build without problems with my setup).

    Can anyone suggest what should be changed in CMakeList.txt it will build?

Viewing 9 posts - 1 through 9 (of 9 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded