2020-08-25 16:05:56 +02:00
|
|
|
# === This file is part of Calamares - <https://calamares.io> ===
|
2020-08-26 00:24:52 +02:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
#
|
|
|
|
|
2019-05-07 13:16:48 +02:00
|
|
|
# libcalamaresui is the GUI part of Calamares, which includes handling
|
|
|
|
# view modules, view steps, widgets, and branding.
|
|
|
|
|
|
|
|
# The UI libs use the non-UI library
|
2022-02-08 16:13:40 +01:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR})
|
2019-05-07 13:16:48 +02:00
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
set(calamaresui_SOURCES
|
2016-09-25 03:20:50 +02:00
|
|
|
modulesystem/CppJobModule.cpp
|
2020-03-31 22:44:02 +02:00
|
|
|
modulesystem/ModuleFactory.cpp
|
2014-07-03 18:00:40 +02:00
|
|
|
modulesystem/ModuleManager.cpp
|
2014-07-10 17:11:03 +02:00
|
|
|
modulesystem/ProcessJobModule.cpp
|
2014-07-03 18:00:40 +02:00
|
|
|
modulesystem/ViewModule.cpp
|
2023-09-11 20:38:55 +02:00
|
|
|
utils/Gui.cpp
|
2014-08-26 15:18:30 +02:00
|
|
|
utils/ImageRegistry.cpp
|
2019-07-30 15:09:25 +02:00
|
|
|
utils/Paste.cpp
|
2018-06-13 11:11:31 +02:00
|
|
|
viewpages/BlankViewStep.cpp
|
2020-01-10 11:56:30 +01:00
|
|
|
viewpages/ExecutionViewStep.cpp
|
2020-05-13 14:01:51 +02:00
|
|
|
viewpages/Slideshow.cpp
|
2014-07-03 18:00:40 +02:00
|
|
|
viewpages/ViewStep.cpp
|
2014-09-03 17:56:46 +02:00
|
|
|
widgets/ClickableLabel.cpp
|
2021-12-07 12:24:41 +01:00
|
|
|
widgets/ErrorDialog.cpp
|
2015-06-20 01:04:54 +02:00
|
|
|
widgets/FixedAspectRatioLabel.cpp
|
2020-05-18 10:38:45 +02:00
|
|
|
widgets/PrettyRadioButton.cpp
|
2022-03-06 14:45:48 +01:00
|
|
|
widgets/LogWidget.cpp
|
2021-09-07 17:15:30 +02:00
|
|
|
widgets/TranslationFix.cpp
|
2014-09-03 17:56:46 +02:00
|
|
|
widgets/WaitingWidget.cpp
|
2022-04-16 11:59:31 +02:00
|
|
|
widgets/waitingspinnerwidget.cpp
|
2014-10-10 18:18:35 +02:00
|
|
|
Branding.cpp
|
2014-07-03 18:00:40 +02:00
|
|
|
ViewManager.cpp
|
|
|
|
)
|
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
if(WITH_PYTHON)
|
|
|
|
list(APPEND calamaresui_SOURCES modulesystem/PythonJobModule.cpp)
|
2014-07-16 16:09:53 +02:00
|
|
|
endif()
|
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
if(WITH_QML)
|
|
|
|
list(APPEND calamaresui_SOURCES utils/Qml.cpp viewpages/QmlViewStep.cpp)
|
2016-10-02 19:14:56 +02:00
|
|
|
endif()
|
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
calamares_add_library(calamaresui
|
2017-09-18 12:12:10 +02:00
|
|
|
SOURCES ${calamaresui_SOURCES}
|
2023-09-28 20:52:56 +02:00
|
|
|
TARGET_TYPE SHARED
|
2020-02-17 16:52:45 +01:00
|
|
|
EXPORT_MACRO UIDLLEXPORT_PRO
|
2017-10-24 18:53:20 +02:00
|
|
|
LINK_LIBRARIES
|
2023-09-03 21:36:13 +02:00
|
|
|
${qtname}::Svg
|
2014-08-26 15:18:30 +02:00
|
|
|
RESOURCES libcalamaresui.qrc
|
2020-06-10 00:31:13 +02:00
|
|
|
EXPORT Calamares
|
2021-12-07 14:20:31 +01:00
|
|
|
UI
|
|
|
|
utils/ErrorDialog/ErrorDialog.ui
|
2014-07-03 18:00:40 +02:00
|
|
|
VERSION ${CALAMARES_VERSION_SHORT}
|
2022-08-23 15:45:20 +02:00
|
|
|
SOVERSION ${CALAMARES_SOVERSION}
|
2014-07-03 18:00:40 +02:00
|
|
|
)
|
2022-02-08 16:13:40 +01:00
|
|
|
target_link_libraries(calamaresui PRIVATE yamlcpp::yamlcpp)
|
2023-09-04 21:51:03 +02:00
|
|
|
target_link_libraries(calamaresui PRIVATE ${kfname}::CoreAddons)
|
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
if(WITH_QML)
|
2023-09-03 21:36:13 +02:00
|
|
|
target_link_libraries(calamaresui PUBLIC ${qtname}::QuickWidgets)
|
2020-05-14 16:18:52 +02:00
|
|
|
endif()
|
2020-06-10 16:43:34 +02:00
|
|
|
|
2024-02-20 11:23:12 +01:00
|
|
|
set_target_properties(
|
|
|
|
calamaresui
|
|
|
|
PROPERTIES
|
|
|
|
CXX_VISIBILITY_PRESET hidden
|
|
|
|
)
|
2023-09-11 22:49:56 +02:00
|
|
|
|
2021-07-26 14:22:28 +02:00
|
|
|
add_library(Calamares::calamaresui ALIAS calamaresui)
|
|
|
|
|
2020-06-10 16:43:34 +02:00
|
|
|
### Installation
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# The library is already installed through calamares_add_library(),
|
|
|
|
# so we only need to do headers. Unlike the Calamares source tree,
|
|
|
|
# where libcalamares and libcalamaresui live in different branches,
|
|
|
|
# we're going to glom it all together in the installed headers location.
|
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
install(FILES Branding.h ViewManager.h DESTINATION include/libcalamares)
|
2020-06-10 16:43:34 +02:00
|
|
|
|
|
|
|
# Install each subdir-worth of header files
|
2022-02-08 16:13:40 +01:00
|
|
|
foreach(subdir modulesystem utils viewpages widgets)
|
|
|
|
file(GLOB subdir_headers "${subdir}/*.h")
|
|
|
|
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
2020-06-10 16:43:34 +02:00
|
|
|
endforeach()
|
2021-03-09 17:55:10 +01:00
|
|
|
|
2022-02-08 16:13:40 +01:00
|
|
|
calamares_add_test(test_libcalamaresuipaste SOURCES utils/TestPaste.cpp utils/Paste.cpp LIBRARIES calamaresui)
|