cmake_minimum_required(VERSION 3.16) project(QmakeUtfTest VERSION 0.12.345 LANGUAGES C CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Set up AUTOMOC and some sensible defaults for runtime execution # When using Qt 6.3, you can replace the code block below with # qt_standard_project_setup() set(CMAKE_AUTOMOC ON) include(GNUInstallDirs) find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Quick) qt_add_executable(QmakeUtfTest WIN32 MACOSX_BUNDLE main.cpp ) target_link_libraries(QmakeUtfTest PRIVATE Qt::Core Qt::Gui Qt::Quick ) # Resources: set(qmake_resources_resource_files "main.qml" ) qt_add_resources(QmakeUtfTest "qmake_resources" PREFIX "/$${TARGET}" FILES ${qmake_resources_resource_files} ) install(TARGETS QmakeUtfTest BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) # Consider using qt_generate_deploy_app_script() for app deployment if # the project can use Qt 6.3. In that case rerun qmake2cmake with # --min-qt-version=6.3.