1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00
ScreenPlay/ScreenPlayWidget/CMakeLists.txt

78 lines
1.8 KiB
CMake
Raw Normal View History

2020-10-29 18:53:52 +01:00
project(ScreenPlayWidget LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
2022-04-04 18:09:45 +02:00
set(SOURCES main.cpp src/widgetwindow.cpp)
2022-04-04 18:09:45 +02:00
set(HEADER src/widgetwindow.h)
2022-04-04 18:09:45 +02:00
set(QML qml/Test.qml qml/Widget.qml)
find_package(
Qt6
COMPONENTS Core
Quick
Gui
Widgets
WebSockets
Svg
WebEngineCore
WebEngineQuick
WebChannel
Positioning)
set(RESOURCES
assets/icons/baseline-opacity-24px.svg
assets/icons/baseline-settings-20px.svg
assets/icons/baseline-close-24px.svg
assets/image/noisy-texture-3.png)
qt_add_executable(
${PROJECT_NAME}
${SOURCES}
${HEADER}
${RESOURCES})
target_link_libraries(
${PROJECT_NAME}
PRIVATE ScreenPlaySDK
ScreenPlayUtil
ScreenPlayWeatherplugin
Qt6::Quick
Qt6::Gui
Qt6::Widgets
Qt6::Core
Qt6::WebSockets
Qt6::Svg
Qt6::WebEngineCore
Qt6::WebEngineQuick)
if(WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlaySysInfoplugin)
endif()
qt_add_qml_module(
${PROJECT_NAME}
URI
${PROJECT_NAME}
VERSION
1.0
OUTPUT_DIRECTORY
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
QML_FILES
${QML}
RESOURCES
${RESOURCES})
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)
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()