Build Qt Tests with CMake
Here is an example of using cmake 2.8.11 and Qt5.2. Note that cmake now supports testfiles with a .moc-include at the bottom. CMakeLists.txt: cmake_minimum_required(VERSION 2.8.11) project(foo) enable_testing() # Tell CMake to run moc when necessary: set(CMAKE_AUTOMOC ON) # As moc files are generated in the binary dir, tell CMake # to always look for includes … Read more