mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
4504f06eb1
# Conflicts: # CMakeLists.txt # ScreenPlay/app.h # ScreenPlay/main.cpp # ScreenPlay/main.qml # ScreenPlay/qml/Navigation/Navigation.qml # ScreenPlay/src/settings.h # ScreenPlay/translations/ScreenPlay_zh_cn.qm # ScreenPlayWallpaper/CMakeLists.txt # ScreenPlayWallpaper/SPWResources.qrc # ScreenPlayWallpaper/qml/Wallpaper.qml
55 lines
1.5 KiB
CMake
55 lines
1.5 KiB
CMake
project(ScreenPlayWidget LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
find_package(QT NAMES Qt6 COMPONENTS Core)
|
|
set(src main.cpp src/widgetwindow.cpp)
|
|
|
|
set(headers src/widgetwindow.h)
|
|
|
|
find_package(
|
|
Qt6
|
|
COMPONENTS Core
|
|
Quick
|
|
Gui
|
|
Widgets
|
|
WebSockets
|
|
Svg
|
|
WebEngineCore
|
|
WebEngineQuick
|
|
WebChannel
|
|
Positioning)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
|
qt_add_resources(resources SPWidgetResources.qrc)
|
|
else()
|
|
qtquick_compiler_add_resources(resources SPWidgetResources.qrc)
|
|
endif()
|
|
|
|
add_executable(${PROJECT_NAME} ${src} ${headers} ${resources})
|
|
|
|
target_link_libraries(
|
|
${PROJECT_NAME}
|
|
PRIVATE Qt6::Quick
|
|
Qt6::Gui
|
|
Qt6::Widgets
|
|
Qt6::Core
|
|
Qt6::WebSockets
|
|
Qt6::Svg
|
|
Qt6::WebEngineCore
|
|
Qt6::WebEngineQuick)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlaySDK ScreenPlayUtil)
|
|
|
|
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()
|