add_executable(latex2png latex2png.cpp) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED) target_link_libraries( latex2png PRIVATE microtex microtex-qt Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui )