Hi. can i use felo with cmake? If so, how can I do it?
-
AuthorPosts
-
September 1, 2019 at 03:21 #22116
Didier
September 4, 2019 at 18:51 #22125
AlexFelgo TeamHi Didier,
you can use Felgo with cmake just like it applies to Qt. You can refer to the official Qt documentation to find more on this: https://doc.qt.io/qt-5/cmake-manual.html
Cheers,
AlexJune 29, 2020 at 15:53 #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
June 29, 2020 at 16:42 #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.
July 3, 2020 at 14:09 #23642
AlexFelgo TeamHi,
did you already check out this example? https://github.com/FelgoSDK/QtQuickFelgoLiveExample-CMake
Best,
AlexJuly 4, 2020 at 10:25 #23649
NgapWei
Thanks for the example 🙂
August 3, 2020 at 11:43 #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 WindowsAugust 5, 2020 at 13:25 #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 errorC:\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 sameFebruary 7, 2023 at 12:24 #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 Marketplaceerror:
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?
You must be logged in to reply to this topic.