2023-01-19 10:33:49 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
2021-01-28 15:19:46 +01:00
|
|
|
project(ScreenPlayUtil LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
2021-09-10 11:09:38 +02:00
|
|
|
|
2021-01-28 15:19:46 +01:00
|
|
|
find_package(
|
2021-09-10 11:09:38 +02:00
|
|
|
Qt6
|
2022-02-20 17:55:26 +01:00
|
|
|
COMPONENTS Core Quick
|
2021-01-28 15:19:46 +01:00
|
|
|
REQUIRED)
|
|
|
|
|
2022-04-23 14:32:36 +02:00
|
|
|
set(QML
|
2022-11-02 11:33:40 +01:00
|
|
|
# cmake-format: sort
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/CloseIcon.qml
|
2022-11-06 14:57:45 +01:00
|
|
|
qml/ColorImage.qml
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/Dialog.qml
|
|
|
|
qml/Dialogs/CriticalError.qml
|
|
|
|
qml/Dialogs/MonitorConfiguration.qml
|
|
|
|
qml/Dialogs/SteamNotAvailable.qml
|
2022-11-02 11:33:40 +01:00
|
|
|
qml/FileDropAnimation.qml
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/FileSelector.qml
|
|
|
|
qml/Grow.qml
|
|
|
|
qml/GrowIconLink.qml
|
|
|
|
qml/Headline.qml
|
|
|
|
qml/HeadlineSection.qml
|
|
|
|
qml/ImageSelector.qml
|
2022-11-02 11:33:40 +01:00
|
|
|
qml/JSUtil.js
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/LicenseSelector.qml
|
|
|
|
qml/ModalBackgroundBlur.qml
|
|
|
|
qml/MouseHoverBlocker.qml
|
|
|
|
qml/Popup.qml
|
|
|
|
qml/RippleEffect.qml
|
|
|
|
qml/Shake.qml
|
|
|
|
qml/Slider.qml
|
|
|
|
qml/Tag.qml
|
|
|
|
qml/TagSelector.qml
|
2023-02-11 11:57:09 +01:00
|
|
|
qml/TextField.qml)
|
2022-04-23 14:32:36 +02:00
|
|
|
|
2023-02-02 15:25:26 +01:00
|
|
|
set(SOURCES
|
|
|
|
# cmake-format: sort
|
|
|
|
inc/public/ScreenPlayUtil/httpfileserver.cpp
|
|
|
|
src/contenttypes.cpp
|
|
|
|
src/projectfile.cpp
|
|
|
|
src/util.cpp)
|
2021-01-28 15:19:46 +01:00
|
|
|
|
2021-12-31 13:32:37 +01:00
|
|
|
set(HEADER
|
2022-11-02 11:33:40 +01:00
|
|
|
# cmake-format: sort
|
2022-02-20 17:55:26 +01:00
|
|
|
inc/public/ScreenPlayUtil/AutoPropertyHelpers.h
|
|
|
|
inc/public/ScreenPlayUtil/ConstRefPropertyHelpers.h
|
2022-03-12 14:36:03 +01:00
|
|
|
inc/public/ScreenPlayUtil/contenttypes.h
|
2023-02-02 15:25:26 +01:00
|
|
|
inc/public/ScreenPlayUtil/exitcodes.h
|
2022-02-20 17:55:26 +01:00
|
|
|
inc/public/ScreenPlayUtil/HelpersCommon.h
|
2022-03-12 14:36:03 +01:00
|
|
|
inc/public/ScreenPlayUtil/httpfileserver.h
|
2022-02-20 17:55:26 +01:00
|
|
|
inc/public/ScreenPlayUtil/ListPropertyHelper.h
|
2022-03-12 14:36:03 +01:00
|
|
|
inc/public/ScreenPlayUtil/projectfile.h
|
2022-02-20 17:55:26 +01:00
|
|
|
inc/public/ScreenPlayUtil/PropertyHelpers.h
|
|
|
|
inc/public/ScreenPlayUtil/PtrPropertyHelpers.h
|
2022-03-12 14:36:03 +01:00
|
|
|
inc/public/ScreenPlayUtil/SingletonHelper.h
|
|
|
|
inc/public/ScreenPlayUtil/util.h)
|
2021-01-28 15:19:46 +01:00
|
|
|
|
2022-12-28 11:36:16 +01:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND SOURCES src/macutils.mm)
|
|
|
|
list(APPEND HEADER inc/public/ScreenPlayUtil/macutils.h)
|
|
|
|
endif()
|
|
|
|
|
2022-11-02 11:33:40 +01:00
|
|
|
set(RESOURCES # cmake-format: sort
|
|
|
|
assets/icons/attach_file.svg assets/icons/description.svg assets/icons/folder.svg)
|
2022-05-06 14:51:56 +02:00
|
|
|
|
2022-04-04 18:09:45 +02:00
|
|
|
qt_add_library(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
STATIC
|
|
|
|
${SOURCES}
|
|
|
|
${HEADER})
|
2021-01-28 15:19:46 +01:00
|
|
|
|
2022-04-23 14:32:36 +02:00
|
|
|
qt_add_qml_module(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
OUTPUT_DIRECTORY
|
2022-04-30 12:07:54 +02:00
|
|
|
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
|
2022-11-02 11:33:40 +01:00
|
|
|
RESOURCE_PREFIX
|
|
|
|
/qml
|
2022-04-23 14:32:36 +02:00
|
|
|
URI
|
|
|
|
${PROJECT_NAME}
|
|
|
|
VERSION
|
|
|
|
1.0
|
|
|
|
QML_FILES
|
2022-05-06 14:51:56 +02:00
|
|
|
${QML}
|
|
|
|
RESOURCES
|
|
|
|
${RESOURCES})
|
2021-10-15 15:06:05 +02:00
|
|
|
|
2021-10-23 18:34:25 +02:00
|
|
|
find_path(CPP_HTTPLIB_INCLUDE_DIRS "httplib.h")
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CPP_HTTPLIB_INCLUDE_DIRS})
|
|
|
|
|
2021-06-20 18:50:54 +02:00
|
|
|
target_include_directories(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
PUBLIC inc/public/
|
|
|
|
PRIVATE src/)
|
2021-10-15 15:06:05 +02:00
|
|
|
|
2022-02-20 17:55:26 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick)
|
2021-11-13 14:12:19 +01:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
# Used for query windows monitor data
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC shcore.lib)
|
|
|
|
endif()
|