Skip to content

Installing QT Creator

Using the OS Distribution

Install main IDE package and cmake

apt install qtcreator cmake 

Install QT5 default package.

apt install qt5-default 

Install QML package.

apt install qtdeclarative5-dev

Relogin to make the path environment to update so qtcreator can find the tootls.

Using Online Qt Installer (account required)

Download the installer here

Some Packages.....

Running CMake to Compile

Steps to compile a CMakeLists.txt file.

CMake Configure

Configure cmake not in the source directory but in a special build directory.

cmake -B build-dir --config source-dir

CMake Build

Build using cmake targeting all.

cmake --build build-dir --target all

Build using cmake targeting clean.

cmake --build build-dir --target clean

Build using cmake targeting all and do a clean first.

cmake --build build-dir --target all --clean-first

Checkout

set(dir ${CMAKE_CURRENT_SOURCE_DIR}/../build-/)
set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
set(CMAKE_BUILD_DIRECTORY ${dir})
set(CMAKE_BINARY_DIR  ${dir})
SET(EXECUTABLE_OUTPUT_PATH ${dir})
SET(LIBRARY_OUTPUT_PATH ${dir}lib)
SET(CMAKE_CACHEFILE_DIR ${dir})