cmake_minimum_required(VERSION 3.16) project(roulette-payout VERSION 1.0.0 LANGUAGES CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.2 COMPONENTS Core Widgets QuickControls2 Gui REQUIRED) qt_standard_project_setup() qt_add_resources(QRC res.qrc) set(SOURCES main.cpp MainWindow.cpp MainWindow.h PlayerAreaModel.cpp PlayerAreaModel.h ${QRC}) qt_add_executable(roulette-payout ${SOURCES} ) qt_add_qml_module(roulette-payout URI roulette # without this no resource flag, when you load qml files with qrc:// urls # qt will look for the files in RESOURCE_PREFIX + URI aka /roulette # we don't want a roulette folder in our project, so we use this flag # to ignore the "+ URI" part NO_RESOURCE_TARGET_PATH VERSION 1.0 RESOURCE_PREFIX "/" QML_FILES Root.qml BetInputDialog.qml BetButton.qml PlayerAreaView.qml Roulette.qml StreetBetsView.qml Columns.qml Dozens.qml ) target_link_libraries(roulette-payout PRIVATE Qt6::Gui Qt6::QuickControls2 Qt6::Quick)