1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-25 12:13:00 +01:00
ScreenPlay/ScreenPlayWidget/CMakeLists.txt
2021-10-15 15:06:05 +02:00

64 lines
1.5 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
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
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()