If you try to use clean code programming using CMake you will not pollute global namespace with unnessesary variables.
For using this library user had to and newbie developers usually do define something like this:
You could see this many times in various tutorials and sample projects.
More correct way is to define variables like AUTOMOC on per project basis library using set_target_property command.
As for define required C++ standard since you do not use specific compiler's features you can use CXX_STANDARD variable as for portable. Again on per project basic.
Since you do use C language (defined by default) you need to define list of used languages (only C++ usually). This will increase CMake configure time especially if users of library also uses only C++ in Qt projects
If you try to use clean code programming using CMake you will not pollute global namespace with unnessesary variables.
For using this library user had to and newbie developers usually do define something like this:
You could see this many times in various tutorials and sample projects.
More correct way is to define variables like
AUTOMOC
on per project basis library usingset_target_property
command.As for define required C++ standard since you do not use specific compiler's features you can use
CXX_STANDARD
variable as for portable. Again on per project basic.Since you do use
C
language (defined by default) you need to define list of used languages (only C++ usually). This will increase CMake configure time especially if users of library also uses only C++ in Qt projects