2023-01-19 10:33:49 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
2024-11-09 10:53:29 +01:00
|
|
|
project(ScreenPlayCore LANGUAGES CXX)
|
2021-01-28 15:19:46 +01:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
2021-09-10 11:09:38 +02:00
|
|
|
|
2023-10-29 18:10:13 +01:00
|
|
|
find_package(fmt CONFIG REQUIRED)
|
2023-12-20 15:08:30 +01:00
|
|
|
|
2023-12-01 16:15:53 +01:00
|
|
|
# Needed on macos
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
find_package(LibArchive REQUIRED)
|
2021-01-28 15:19:46 +01:00
|
|
|
find_package(
|
2021-09-10 11:09:38 +02:00
|
|
|
Qt6
|
2023-12-01 16:15:53 +01:00
|
|
|
COMPONENTS Core Quick Gui
|
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
|
2024-08-14 14:06:53 +02:00
|
|
|
qml/ErrorPopup.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
|
2024-08-14 14:06:53 +02:00
|
|
|
qml/InstantPopup.js
|
2024-03-01 09:20:11 +01:00
|
|
|
qml/LabelSlider.qml
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/LicenseSelector.qml
|
|
|
|
qml/ModalBackgroundBlur.qml
|
|
|
|
qml/MouseHoverBlocker.qml
|
|
|
|
qml/Popup.qml
|
2024-08-14 14:06:53 +02:00
|
|
|
qml/RainbowGradient.qml
|
2022-04-23 14:32:36 +02:00
|
|
|
qml/RippleEffect.qml
|
|
|
|
qml/Shake.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
|
2023-12-03 11:45:20 +01:00
|
|
|
src/archive.cpp
|
2023-02-02 15:25:26 +01:00
|
|
|
src/contenttypes.cpp
|
2023-12-03 11:45:20 +01:00
|
|
|
src/exitcodes.cpp
|
2023-10-29 18:10:13 +01:00
|
|
|
src/logginghandler.cpp
|
2024-03-01 09:20:11 +01:00
|
|
|
src/processmanager.cpp
|
2023-02-02 15:25:26 +01:00
|
|
|
src/projectfile.cpp
|
2023-12-01 16:40:59 +01:00
|
|
|
src/steamenumsgenerated.cpp
|
2023-12-03 11:45:20 +01:00
|
|
|
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
|
2024-11-09 10:53:29 +01:00
|
|
|
inc/public/ScreenPlayCore/archive.h
|
|
|
|
inc/public/ScreenPlayCore/contenttypes.h
|
|
|
|
inc/public/ScreenPlayCore/exitcodes.h
|
|
|
|
inc/public/ScreenPlayCore/globalenums.h
|
|
|
|
inc/public/ScreenPlayCore/HelpersCommon.h
|
|
|
|
inc/public/ScreenPlayCore/ListPropertyHelper.h
|
|
|
|
inc/public/ScreenPlayCore/logginghandler.h
|
|
|
|
inc/public/ScreenPlayCore/processmanager.h
|
|
|
|
inc/public/ScreenPlayCore/projectfile.h
|
|
|
|
inc/public/ScreenPlayCore/PropertyHelpers.h
|
|
|
|
inc/public/ScreenPlayCore/steamenumsgenerated.h
|
|
|
|
inc/public/ScreenPlayCore/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)
|
2024-11-09 10:53:29 +01:00
|
|
|
list(APPEND HEADER inc/public/ScreenPlayCore/macutils.h)
|
2022-12-28 11:36:16 +01:00
|
|
|
endif()
|
|
|
|
|
2022-11-02 11:33:40 +01:00
|
|
|
set(RESOURCES # cmake-format: sort
|
2024-03-01 09:20:11 +01:00
|
|
|
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}
|
2023-12-03 11:45:20 +01:00
|
|
|
${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-06-20 18:50:54 +02:00
|
|
|
target_include_directories(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
PUBLIC inc/public/
|
|
|
|
PRIVATE src/)
|
2023-12-01 14:50:36 +01:00
|
|
|
|
2024-11-09 10:53:29 +01:00
|
|
|
# Note making this public is so thatScreenPlayCore_qmltyperegistrations.cpp can find the #include <contenttypes.h> include
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC inc/public/ScreenPlayCore)
|
|
|
|
target_include_directories(${PROJECT_NAME}plugin PUBLIC inc/public/ScreenPlayCore)
|
2023-12-01 14:50:36 +01:00
|
|
|
|
2023-11-01 12:28:35 +01:00
|
|
|
target_link_libraries(
|
|
|
|
${PROJECT_NAME}
|
2024-03-01 09:20:11 +01:00
|
|
|
PUBLIC Qt6::Core
|
|
|
|
Qt6::Quick
|
|
|
|
Qt6::Gui
|
|
|
|
QCoro6::Core
|
|
|
|
QCoro6::Qml
|
|
|
|
fmt::fmt-header-only
|
|
|
|
LibArchive::LibArchive
|
|
|
|
QArchive)
|
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()
|
2023-11-29 10:53:39 +01:00
|
|
|
|
|
|
|
# ##### USE CMAKE VARIABLES IN CODE #####
|
|
|
|
include(GenerateCMakeVariableHeader)
|
|
|
|
generate_cmake_variable_header(${PROJECT_NAME})
|