cmake_minimum_required(VERSION 3.21) project(NebulaBigscreen VERSION 0.1.0 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) find_package(Qt6 6.5 REQUIRED COMPONENTS Quick Gui) qt_standard_project_setup(REQUIRES 6.5) qt_policy(SET QTP0004 NEW) set(BIGSCREEN_QML_FILES qml/Main.qml qml/ShellWindow.qml qml/Theme.qml qml/components/NebulaBackground.qml qml/components/TopBar.qml qml/components/AppTile.qml qml/components/TileRail.qml qml/components/PowerOverlay.qml qml/views/HomeView.qml qml/views/LibraryView.qml qml/views/SettingsView.qml ) set_source_files_properties(qml/Theme.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE) qt_add_executable(nebula-bigscreen src/main.cpp src/InputRouter.cpp src/InputRouter.h ) qt_add_qml_module(nebula-bigscreen URI Nebula.Bigscreen VERSION 1.0 QML_FILES ${BIGSCREEN_QML_FILES} ) target_link_libraries(nebula-bigscreen PRIVATE Qt6::Quick Qt6::Gui ) if(WIN32) set_target_properties(nebula-bigscreen PROPERTIES WIN32_EXECUTABLE TRUE) get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}" REQUIRED) add_custom_command( TARGET nebula-bigscreen POST_BUILD COMMAND "${WINDEPLOYQT_EXECUTABLE}" $<$:--debug> $<$>:--release> --qmldir "${CMAKE_CURRENT_SOURCE_DIR}/qml" "$" COMMENT "Deploying Qt runtime DLLs next to nebula-bigscreen" ) endif() install(TARGETS nebula-bigscreen RUNTIME DESTINATION bin)