calamares/src/libcalamaresui/CMakeLists.txt

85 lines
2.4 KiB
CMake
Raw Normal View History

# 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
include_directories( ${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR} )
set( calamaresui_SOURCES
modulesystem/CppJobModule.cpp
modulesystem/ModuleFactory.cpp
modulesystem/ModuleManager.cpp
modulesystem/ProcessJobModule.cpp
modulesystem/ViewModule.cpp
utils/CalamaresUtilsGui.cpp
utils/ImageRegistry.cpp
utils/Paste.cpp
viewpages/BlankViewStep.cpp
viewpages/ExecutionViewStep.cpp
viewpages/Slideshow.cpp
viewpages/ViewStep.cpp
widgets/ClickableLabel.cpp
2015-06-20 01:04:54 +02:00
widgets/FixedAspectRatioLabel.cpp
widgets/PrettyRadioButton.cpp
widgets/WaitingWidget.cpp
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
2014-08-21 17:44:35 +02:00
Branding.cpp
ViewManager.cpp
)
# Don't warn about third-party sources
mark_thirdparty_code(
${CMAKE_SOURCE_DIR}/3rdparty/qjsonitem.cpp
${CMAKE_SOURCE_DIR}/3rdparty/qjsonmodel.cpp
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
)
if( WITH_PYTHON )
2017-09-18 12:12:10 +02:00
list( APPEND calamaresui_SOURCES
modulesystem/PythonJobModule.cpp
)
endif()
if( WITH_PYTHONQT )
2017-09-18 12:12:10 +02:00
list( APPEND calamaresui_SOURCES
modulesystem/PythonQtViewModule.cpp
utils/PythonQtUtils.cpp
2016-10-27 15:13:05 +02:00
viewpages/PythonQtJob.cpp
2016-10-04 15:29:17 +02:00
viewpages/PythonQtViewStep.cpp
2016-10-21 16:38:49 +02:00
viewpages/PythonQtGlobalStorageWrapper.cpp
viewpages/PythonQtUtilsWrapper.cpp
)
endif()
if( WITH_QML )
list( APPEND calamaresui_SOURCES
utils/Qml.cpp
viewpages/QmlViewStep.cpp
)
endif()
2017-09-18 12:12:10 +02:00
calamares_add_library( calamaresui
SOURCES ${calamaresui_SOURCES}
EXPORT_MACRO UIDLLEXPORT_PRO
LINK_LIBRARIES
Qt5::Svg
RESOURCES libcalamaresui.qrc
EXPORT CalamaresLibraryDepends
VERSION ${CALAMARES_VERSION_SHORT}
)
if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 )
target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease )
endif()
if( WITH_PYTHONQT )
# *_DIRS because we also use extensions
target_include_directories( calamaresui PRIVATE ${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIRS} )
target_link_libraries( calamaresui PRIVATE ${PYTHON_LIBRARIES} ${PYTHONQT_LIBRARIES} )
endif()
if( WITH_QML )
target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets )
endif()