1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00
ScreenPlay/ScreenPlayWidget/CMakeLists.txt
Elias Steurer fb5d6581ec Change all plugins to be QML_ELEMENT
Add ScreenPlayWeather
2022-02-20 17:55:26 +01:00

68 lines
1.6 KiB
CMake

project(ScreenPlayWidget LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
set(SOURCES # cmake-format: sortable
main.cpp src/widgetwindow.cpp)
set(HEADER # cmake-format: sortable
src/widgetwindow.h)
set(QML # cmake-format: sortable
qml/Test.qml qml/Widget.qml)
find_package(
Qt6
COMPONENTS Core
Quick
Gui
Widgets
WebSockets
Svg
WebEngineCore
WebEngineQuick
WebChannel
Positioning)
qt_add_resources(RESOURCES Resources.qrc)
qt_add_executable(${PROJECT_NAME} ${SOURCES} ${HEADER} ${RESOURCES})
target_link_libraries(
${PROJECT_NAME}
PRIVATE ScreenPlaySDK
ScreenPlayUtil
ScreenPlayWeatherplugin
ScreenPlaySysInfoplugin
Qt6::Quick
Qt6::Gui
Qt6::Widgets
Qt6::Core
Qt6::WebSockets
Qt6::Svg
Qt6::WebEngineCore
Qt6::WebEngineQuick)
qt_add_qml_module(
${PROJECT_NAME}
URI
${PROJECT_NAME}
VERSION
1.0
OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}
QML_FILES
${QML})
if(WIN32)
# 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)
endif()
if(APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif()