2020-10-29 18:53:52 +01:00
|
|
|
project(ScreenPlayWidget LANGUAGES CXX)
|
2020-05-16 13:37:32 +02:00
|
|
|
|
2021-01-28 15:19:46 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2020-03-10 12:16:58 +01:00
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
2020-05-16 13:37:32 +02:00
|
|
|
|
2022-04-04 18:09:45 +02:00
|
|
|
set(SOURCES main.cpp src/widgetwindow.cpp)
|
2020-05-16 13:37:32 +02:00
|
|
|
|
2022-04-04 18:09:45 +02:00
|
|
|
set(HEADER src/widgetwindow.h)
|
2021-10-15 15:06:05 +02:00
|
|
|
|
2022-04-04 18:09:45 +02:00
|
|
|
set(QML qml/Test.qml qml/Widget.qml)
|
2020-05-16 13:37:32 +02:00
|
|
|
|
2021-09-10 11:09:38 +02:00
|
|
|
find_package(
|
|
|
|
Qt6
|
|
|
|
COMPONENTS Core
|
|
|
|
Quick
|
|
|
|
Gui
|
|
|
|
Widgets
|
|
|
|
WebSockets
|
|
|
|
Svg
|
|
|
|
WebEngineCore
|
|
|
|
WebEngineQuick
|
|
|
|
WebChannel
|
|
|
|
Positioning)
|
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
qt_add_resources(RESOURCES Resources.qrc)
|
2020-06-19 18:06:09 +02:00
|
|
|
|
2022-03-12 14:36:03 +01:00
|
|
|
qt_add_executable(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
${SOURCES}
|
|
|
|
${HEADER}
|
|
|
|
${RESOURCES})
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-09-10 11:09:38 +02:00
|
|
|
target_link_libraries(
|
|
|
|
${PROJECT_NAME}
|
2021-10-15 15:06:05 +02:00
|
|
|
PRIVATE ScreenPlaySDK
|
|
|
|
ScreenPlayUtil
|
2022-02-20 17:55:26 +01:00
|
|
|
ScreenPlayWeatherplugin
|
|
|
|
ScreenPlaySysInfoplugin
|
2021-10-15 15:06:05 +02:00
|
|
|
Qt6::Quick
|
2021-09-10 11:09:38 +02:00
|
|
|
Qt6::Gui
|
|
|
|
Qt6::Widgets
|
|
|
|
Qt6::Core
|
|
|
|
Qt6::WebSockets
|
|
|
|
Qt6::Svg
|
|
|
|
Qt6::WebEngineCore
|
|
|
|
Qt6::WebEngineQuick)
|
|
|
|
|
2022-04-04 18:06:43 +02:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlaySysInfoplugin)
|
|
|
|
endif()
|
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
qt_add_qml_module(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
URI
|
|
|
|
${PROJECT_NAME}
|
|
|
|
VERSION
|
|
|
|
1.0
|
2022-02-20 17:55:26 +01:00
|
|
|
OUTPUT_DIRECTORY
|
|
|
|
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}
|
2021-10-15 15:06:05 +02:00
|
|
|
QML_FILES
|
|
|
|
${QML})
|
2021-07-16 16:44:28 +02:00
|
|
|
|
2021-01-16 17:31:07 +01:00
|
|
|
if(WIN32)
|
2021-01-16 17:57:36 +01:00
|
|
|
# Disable console window on Windows
|
|
|
|
# https://stackoverflow.com/questions/8249028/how-do-i-keep-my-qt-c-program-from-opening-a-console-in-windows
|
|
|
|
set_property(TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)
|
2021-01-16 17:31:07 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(APPLE)
|
2021-07-11 08:27:13 +02:00
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
2021-01-16 17:31:07 +01:00
|
|
|
endif()
|