Dax89 / QHexView

A versatile Hexadecimal widget for Qt5
MIT License
323 stars 101 forks source link

Fix missing MOC generation for correct including #67

Closed tarhan closed 3 years ago

tarhan commented 3 years ago

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:

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

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

Dax89 commented 3 years ago

Thanks for the tips, merged!

tarhan commented 3 years ago

You welcome