What are CMake vs qmake pros and cons?

Both are build systems, but they’re not very similar at all. If your project uses Qt, you’re probably best off using qmake. CMake is more generic, and fits pretty much any type of project. Both qmake and CMake generate a Makefile, which is read by make to build the project. Not all build systems generate … Read more

How to detect target architecture using CMake?

So I devised a rather creative solution to my problem… it appears that CMake has no functionality to detect the target architecture whatsoever. Now, we know we can easily do this in C because symbols like __i386__, __x86_64__, etc., will be defined depending on your environment. Fortunately CMake has a try_run function which will compile … Read more

How to use QMake’s subdirs template?

In addition to Troubadour’s comment, I would note that the SUBDIRS target is only good for specifying subdirectories. Therefore, your extra line of SOURCES += main.cpp in your project.pro file is incorrect, and will likely fail to build your main.cpp file, at worst. At best, qmake will refuse to parse the file, since it has … Read more

Qt: *.pro vs *.pri

There is one main difference between their targetted reuse: .pro This is usually called Project File. .pri This is usually called Project Include File. As you can see in their names, the main difference is that .pri files are meant to be include files. That is similar to including modules in programming language to share … Read more

How to specify different Debug/Release output directories in QMake .pro file

For my Qt project, I use this scheme in *.pro file: HEADERS += src/dialogs.h SOURCES += src/main.cpp \ src/dialogs.cpp Release:DESTDIR = release Release:OBJECTS_DIR = release/.obj Release:MOC_DIR = release/.moc Release:RCC_DIR = release/.rcc Release:UI_DIR = release/.ui Debug:DESTDIR = debug Debug:OBJECTS_DIR = debug/.obj Debug:MOC_DIR = debug/.moc Debug:RCC_DIR = debug/.rcc Debug:UI_DIR = debug/.ui It`s simple, but nice! 🙂

qmake: could not find a Qt installation of ”

sudo apt-get install qt5-default works for me. $ aptitude show qt5-default tells that This package sets Qt 5 to be the default Qt version to be used when using development binaries like qmake. It provides a default configuration for qtchooser, but does not prevent alternative Qt installations from being used.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)