convert Cmake file to Qmake
-
@saber There is no need to add all these CMake directories like: /usr/lib64/cmake/...
Also no need to add libraries from /usr/lib - these will be found automatically if needed.
Try withQT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = CoreImageViewer TEMPLATE = app DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ icons.qrc \ graphicsscene.cpp \ iapplication.cpp \ iapplicationadaptor.cpp \ imageview.cpp \ loadimagejob.cpp \ lximage-qt.cpp \ mainwindow.cpp \ modelfilter.cpp \ saveimagejob.cpp \ screenshotdialog.cpp \ screenshotselectarea.cpp \ screenshotselectareagraphicsview.cpp HEADERS += \ graphicsscene.h \ iapplication.h \ iapplicationadaptor.h \ imageview.h \ loadimagejob.h \ lximage-qt.h \ mainwindow.h \ modelfilter.h \ saveimagejob.h \ screenshotdialog.h \ screenshotselectarea.h \ screenshotselectareagraphicsview.h \ ui_mainwindow.h \ ui_screenshotdialog.h FORMS += \ mainwindow.ui \ screenshotdialog.ui -
@jsulm Thanks for reply
Qt outputs this error
/usr/include/libfm/fm-folder.h:28: error: glib-object.h: No such file or directory #include <glib-object.h> ^~~~~~~~~~~~~~~ -
@saber On Ubuntu you need to install libglib2.0-dev package.
Not Qt is outputting this error, but the compiler. -
@jsulm
It is in my linux system.(manjaro)
cmake file can find it and it build without error.
i think qmake file is not finding it. -
@jsulm sorry for delay.new user can post after 300 second.
glib2.0 is located in " /usr/lib/glib-2.0/"
to build this app it also needs 2 folder "lxqt-build-tools" and "fm-qt "
i have thoes installed but no linkeage in qmake.but cmake file link this two file.
-
@jsulm sorry for delay.new user can post after 300 second.
glib2.0 is located in " /usr/lib/glib-2.0/"
to build this app it also needs 2 folder "lxqt-build-tools" and "fm-qt "
i have thoes installed but no linkeage in qmake.but cmake file link this two file.
@saber said in convert Cmake file to Qmake:
/usr/lib/glib-2.0/
This is the directory containing the libs. Your problem is the header file. Where is glib-object.h located?
-
@saber said in convert Cmake file to Qmake:
/usr/lib/glib-2.0/
This is the directory containing the libs. Your problem is the header file. Where is glib-object.h located?
-
@saber Then add this to the pro file:
INCLUDEPATH += /usr/include/glib-2.0Don't forget to rerun qmake before building.
@jsulm it solved old problem .But new one
/usr/include/glib-2.0/glib/gtypes.h:32: error: glibconfig.h: No such file or directory #include <glibconfig.h> ^~~~~~~~~~~~~~i think I should include all the path like you said.
but it will be a long .pro file -
@jsulm it solved old problem .But new one
/usr/include/glib-2.0/glib/gtypes.h:32: error: glibconfig.h: No such file or directory #include <glibconfig.h> ^~~~~~~~~~~~~~i think I should include all the path like you said.
but it will be a long .pro file