calamares/src/libcalamaresui/CMakeLists.txt

92 lines
2.5 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 )
set( calamaresui_SOURCES
modulesystem/CppJobModule.cpp
modulesystem/Module.cpp
modulesystem/ModuleManager.cpp
modulesystem/ProcessJobModule.cpp
modulesystem/Requirement.cpp
modulesystem/RequirementsChecker.cpp
modulesystem/ViewModule.cpp
utils/CalamaresUtilsGui.cpp
2015-03-04 19:35:10 +01:00
utils/DebugWindow.cpp
utils/ImageRegistry.cpp
utils/Paste.cpp
${CMAKE_SOURCE_DIR}/3rdparty/qjsonmodel.cpp
${CMAKE_SOURCE_DIR}/3rdparty/qjsonitem.cpp
2015-03-04 20:22:58 +01:00
viewpages/BlankViewStep.cpp
viewpages/ViewStep.cpp
widgets/ClickableLabel.cpp
2015-06-20 01:04:54 +02:00
widgets/FixedAspectRatioLabel.cpp
widgets/WaitingWidget.cpp
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
2014-08-21 17:44:35 +02:00
2015-09-09 19:01:34 +02:00
ExecutionViewStep.cpp
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
)
set( calamaresui_UI
2015-03-04 19:35:10 +01:00
utils/DebugWindow.ui
)
if( WITH_PYTHON )
2017-09-18 12:12:10 +02:00
list( APPEND calamaresui_SOURCES
modulesystem/PythonJobModule.cpp
)
endif()
if( WITH_PYTHONQT )
include_directories(${PYTHON_INCLUDE_DIRS})
# *_DIRS because we also use extensions
include_directories(${PYTHONQT_INCLUDE_DIRS})
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
)
set( OPTIONAL_PYTHON_LIBRARIES
${PYTHON_LIBRARIES}
${PYTHONQT_LIBRARIES}
)
endif()
2017-09-18 12:12:10 +02:00
calamares_add_library( calamaresui
SOURCES ${calamaresui_SOURCES}
UI ${calamaresui_UI}
EXPORT_MACRO UIDLLEXPORT_PRO
2016-12-07 16:37:29 +01:00
LINK_PRIVATE_LIBRARIES
${OPTIONAL_PYTHON_LIBRARIES}
LINK_LIBRARIES
Qt5::Svg
2016-12-07 16:37:29 +01:00
Qt5::QuickWidgets
RESOURCES libcalamaresui.qrc
EXPORT CalamaresLibraryDepends
VERSION ${CALAMARES_VERSION_SHORT}
)
find_package( KF5CoreAddons 5.58 QUIET ) # If it's really new
if ( KF5CoreAddons_FOUND )
target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease )
target_link_libraries( calamaresui PRIVATE KF5::CoreAddons )
endif()