How to compile Qt program using CMake

Qt is a fantastic library, but it comes with a lot of dependencies. You typically need to use its IDE and compilation tools. If you are already working with standard tools for editing code and compiling, then this generates a huge disadvantage. If you are using CMake, it has support for compiling Qt programs. And hopefully this makes it a bit more easier to use Qt for you.🙂

Information on how to write a CMakeLists.txt to compile Qt can be found here. I have created a sample CMakeLists.txt that compiles a Qt program here:

Tried with: Qt 4, CMake and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s