CMake: blanket-apply gersemi
This commit is contained in:
parent
733e4d64e1
commit
57374a3271
@ -8,10 +8,8 @@ set( calamaresSources
|
|||||||
main.cpp
|
main.cpp
|
||||||
CalamaresApplication.cpp
|
CalamaresApplication.cpp
|
||||||
CalamaresWindow.cpp
|
CalamaresWindow.cpp
|
||||||
|
|
||||||
DebugWindow.cpp
|
DebugWindow.cpp
|
||||||
VariantModel.cpp
|
VariantModel.cpp
|
||||||
|
|
||||||
progresstree/ProgressTreeDelegate.cpp
|
progresstree/ProgressTreeDelegate.cpp
|
||||||
progresstree/ProgressTreeView.cpp
|
progresstree/ProgressTreeView.cpp
|
||||||
)
|
)
|
||||||
@ -44,10 +42,9 @@ include_directories(
|
|||||||
# library (it's just the result of a QRC compile).
|
# library (it's just the result of a QRC compile).
|
||||||
add_executable(calamares_bin ${calamaresSources} calamares.qrc)
|
add_executable(calamares_bin ${calamaresSources} calamares.qrc)
|
||||||
target_include_directories(calamares_bin PRIVATE ${CMAKE_SOURCE_DIR})
|
target_include_directories(calamares_bin PRIVATE ${CMAKE_SOURCE_DIR})
|
||||||
set_target_properties(calamares_bin
|
set_target_properties(
|
||||||
PROPERTIES
|
calamares_bin
|
||||||
ENABLE_EXPORTS TRUE
|
PROPERTIES ENABLE_EXPORTS TRUE RUNTIME_OUTPUT_NAME calamares
|
||||||
RUNTIME_OUTPUT_NAME calamares
|
|
||||||
)
|
)
|
||||||
calamares_automoc( calamares_bin )
|
calamares_automoc( calamares_bin )
|
||||||
calamares_autouic( calamares_bin )
|
calamares_autouic( calamares_bin )
|
||||||
@ -57,7 +54,8 @@ if( kdsagSources )
|
|||||||
set_source_files_properties(${kdsagSources} PROPERTIES AUTOMOC OFF)
|
set_source_files_properties(${kdsagSources} PROPERTIES AUTOMOC OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries( calamares_bin
|
target_link_libraries(
|
||||||
|
calamares_bin
|
||||||
PRIVATE
|
PRIVATE
|
||||||
calamares
|
calamares
|
||||||
calamaresui
|
calamaresui
|
||||||
@ -75,12 +73,16 @@ if( WITH_KF5DBus )
|
|||||||
target_compile_definitions(calamares_bin PRIVATE WITH_KF5DBus)
|
target_compile_definitions(calamares_bin PRIVATE WITH_KF5DBus)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install( TARGETS calamares_bin
|
install(
|
||||||
BUNDLE DESTINATION .
|
TARGETS calamares_bin
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
BUNDLE
|
||||||
|
DESTINATION .
|
||||||
|
RUNTIME
|
||||||
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
install( FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg
|
install(
|
||||||
|
FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg
|
||||||
RENAME calamares.svg
|
RENAME calamares.svg
|
||||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps
|
||||||
)
|
)
|
||||||
@ -91,7 +93,10 @@ install( FILES ${CMAKE_SOURCE_DIR}/data/images/squid.svg
|
|||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
# Don't install, these are just for enable_testing
|
# Don't install, these are just for enable_testing
|
||||||
add_executable(loadmodule testmain.cpp)
|
add_executable(loadmodule testmain.cpp)
|
||||||
target_link_libraries( loadmodule PRIVATE Qt5::Core Qt5::Widgets calamares calamaresui )
|
target_link_libraries(
|
||||||
|
loadmodule
|
||||||
|
PRIVATE Qt5::Core Qt5::Widgets calamares calamaresui
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(test_conf test_conf.cpp)
|
add_executable(test_conf test_conf.cpp)
|
||||||
target_link_libraries(test_conf PUBLIC yamlcpp::yamlcpp Qt5::Core)
|
target_link_libraries(test_conf PUBLIC yamlcpp::yamlcpp Qt5::Core)
|
||||||
|
@ -13,12 +13,18 @@
|
|||||||
add_definitions(-DDLLEXPORT_PRO)
|
add_definitions(-DDLLEXPORT_PRO)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
|
configure_file(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h )
|
${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersion.h.in
|
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
|
)
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersionX.h.in
|
configure_file(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h )
|
${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersion.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersionX.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h
|
||||||
|
)
|
||||||
|
|
||||||
set(OPTIONAL_PRIVATE_LIBRARIES "")
|
set(OPTIONAL_PRIVATE_LIBRARIES "")
|
||||||
set(OPTIONAL_PUBLIC_LIBRARIES "")
|
set(OPTIONAL_PUBLIC_LIBRARIES "")
|
||||||
@ -32,13 +38,11 @@ set( libSources
|
|||||||
JobQueue.cpp
|
JobQueue.cpp
|
||||||
ProcessJob.cpp
|
ProcessJob.cpp
|
||||||
Settings.cpp
|
Settings.cpp
|
||||||
|
|
||||||
# GeoIP services
|
# GeoIP services
|
||||||
geoip/Interface.cpp
|
geoip/Interface.cpp
|
||||||
geoip/GeoIPFixed.cpp
|
geoip/GeoIPFixed.cpp
|
||||||
geoip/GeoIPJSON.cpp
|
geoip/GeoIPJSON.cpp
|
||||||
geoip/Handler.cpp
|
geoip/Handler.cpp
|
||||||
|
|
||||||
# Locale-data service
|
# Locale-data service
|
||||||
locale/Global.cpp
|
locale/Global.cpp
|
||||||
locale/Lookup.cpp
|
locale/Lookup.cpp
|
||||||
@ -47,7 +51,6 @@ set( libSources
|
|||||||
locale/TranslatableString.cpp
|
locale/TranslatableString.cpp
|
||||||
locale/Translation.cpp
|
locale/Translation.cpp
|
||||||
locale/TranslationsModel.cpp
|
locale/TranslationsModel.cpp
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
modulesystem/Config.cpp
|
modulesystem/Config.cpp
|
||||||
modulesystem/Descriptor.cpp
|
modulesystem/Descriptor.cpp
|
||||||
@ -56,19 +59,15 @@ set( libSources
|
|||||||
modulesystem/Preset.cpp
|
modulesystem/Preset.cpp
|
||||||
modulesystem/RequirementsChecker.cpp
|
modulesystem/RequirementsChecker.cpp
|
||||||
modulesystem/RequirementsModel.cpp
|
modulesystem/RequirementsModel.cpp
|
||||||
|
|
||||||
# Network service
|
# Network service
|
||||||
network/Manager.cpp
|
network/Manager.cpp
|
||||||
|
|
||||||
# Packages service
|
# Packages service
|
||||||
packages/Globals.cpp
|
packages/Globals.cpp
|
||||||
|
|
||||||
# Partition service
|
# Partition service
|
||||||
partition/Global.cpp
|
partition/Global.cpp
|
||||||
partition/Mount.cpp
|
partition/Mount.cpp
|
||||||
partition/PartitionSize.cpp
|
partition/PartitionSize.cpp
|
||||||
partition/Sync.cpp
|
partition/Sync.cpp
|
||||||
|
|
||||||
# Utility service
|
# Utility service
|
||||||
utils/CalamaresUtilsSystem.cpp
|
utils/CalamaresUtilsSystem.cpp
|
||||||
utils/CommandList.cpp
|
utils/CommandList.cpp
|
||||||
@ -97,11 +96,7 @@ endif()
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
if(WITH_PYTHON)
|
if(WITH_PYTHON)
|
||||||
list( APPEND libSources
|
list(APPEND libSources PythonHelper.cpp PythonJob.cpp PythonJobApi.cpp)
|
||||||
PythonHelper.cpp
|
|
||||||
PythonJob.cpp
|
|
||||||
PythonJobApi.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(${PYTHON_INCLUDE_DIRS})
|
include_directories(${PYTHON_INCLUDE_DIRS})
|
||||||
link_directories(${PYTHON_LIBRARIES})
|
link_directories(${PYTHON_LIBRARIES})
|
||||||
@ -109,7 +104,9 @@ if( WITH_PYTHON )
|
|||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
link_directories(${Boost_LIBRARY_DIRS})
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
|
|
||||||
list( APPEND OPTIONAL_PRIVATE_LIBRARIES
|
list(
|
||||||
|
APPEND
|
||||||
|
OPTIONAL_PRIVATE_LIBRARIES
|
||||||
${PYTHON_LIBRARIES}
|
${PYTHON_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
)
|
)
|
||||||
@ -137,7 +134,9 @@ if ( KPMcore_FOUND )
|
|||||||
add_definitions(-D${d})
|
add_definitions(-D${d})
|
||||||
endforeach()
|
endforeach()
|
||||||
include_directories(${KPMCORE_INCLUDE_DIR})
|
include_directories(${KPMCORE_INCLUDE_DIR})
|
||||||
list( APPEND libSources
|
list(
|
||||||
|
APPEND
|
||||||
|
libSources
|
||||||
partition/FileSystem.cpp
|
partition/FileSystem.cpp
|
||||||
partition/KPMManager.cpp
|
partition/KPMManager.cpp
|
||||||
partition/PartitionIterator.cpp
|
partition/PartitionIterator.cpp
|
||||||
@ -150,17 +149,19 @@ endif()
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
add_library(calamares SHARED ${libSources})
|
add_library(calamares SHARED ${libSources})
|
||||||
set_target_properties( calamares
|
set_target_properties(
|
||||||
|
calamares
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${CALAMARES_VERSION_SHORT}
|
VERSION ${CALAMARES_VERSION_SHORT}
|
||||||
SOVERSION ${CALAMARES_VERSION_SHORT}
|
SOVERSION ${CALAMARES_VERSION_SHORT}
|
||||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_INSTALL_FULL_INCLUDEDIR}/libcalamares
|
INTERFACE_INCLUDE_DIRECTORIES
|
||||||
|
${CMAKE_INSTALL_FULL_INCLUDEDIR}/libcalamares
|
||||||
)
|
)
|
||||||
calamares_automoc( calamares )
|
calamares_automoc( calamares )
|
||||||
|
|
||||||
target_link_libraries( calamares
|
target_link_libraries(
|
||||||
LINK_PRIVATE
|
calamares
|
||||||
${OPTIONAL_PRIVATE_LIBRARIES}
|
LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES}
|
||||||
LINK_PUBLIC
|
LINK_PUBLIC
|
||||||
yamlcpp::yamlcpp
|
yamlcpp::yamlcpp
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
@ -173,19 +174,26 @@ add_library(Calamares::calamares ALIAS calamares)
|
|||||||
### Installation
|
### Installation
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
install( TARGETS calamares
|
install(
|
||||||
|
TARGETS calamares
|
||||||
EXPORT Calamares
|
EXPORT Calamares
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
ARCHIVE
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
|
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
|
||||||
# lib/calamares can be used as module path for the Python interpreter.
|
# lib/calamares can be used as module path for the Python interpreter.
|
||||||
install( CODE "
|
install(
|
||||||
|
CODE
|
||||||
|
"
|
||||||
file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
|
file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
|
||||||
execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so.${CALAMARES_VERSION_SHORT} libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
|
execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so.${CALAMARES_VERSION_SHORT} libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
|
||||||
")
|
"
|
||||||
|
)
|
||||||
|
|
||||||
# Install header files
|
# Install header files
|
||||||
file(GLOB rootHeaders "*.h")
|
file(GLOB rootHeaders "*.h")
|
||||||
@ -202,7 +210,6 @@ foreach( subdir geoip locale modulesystem network partition utils )
|
|||||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
### TESTING
|
### TESTING
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -224,7 +231,13 @@ function ( calamares_qrc_translations basename )
|
|||||||
set(options "")
|
set(options "")
|
||||||
set(oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE)
|
set(oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE)
|
||||||
set(multiValueArgs LANGUAGES)
|
set(multiValueArgs LANGUAGES)
|
||||||
cmake_parse_arguments( _qrt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
cmake_parse_arguments(
|
||||||
|
_qrt
|
||||||
|
"${options}"
|
||||||
|
"${oneValueArgs}"
|
||||||
|
"${multiValueArgs}"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
if(NOT _qrt_OUTPUT_VARIABLE)
|
if(NOT _qrt_OUTPUT_VARIABLE)
|
||||||
set(_qrt_OUTPUT_VARIABLE "qrc_translations_${basename}")
|
set(_qrt_OUTPUT_VARIABLE "qrc_translations_${basename}")
|
||||||
@ -237,18 +250,38 @@ function ( calamares_qrc_translations basename )
|
|||||||
set(calamares_i18n_qrc_content "")
|
set(calamares_i18n_qrc_content "")
|
||||||
set(calamares_i18n_ts_filelist "")
|
set(calamares_i18n_ts_filelist "")
|
||||||
foreach(lang ${_qrt_LANGUAGES})
|
foreach(lang ${_qrt_LANGUAGES})
|
||||||
string( APPEND calamares_i18n_qrc_content "<file>${basename}_${lang}.qm</file>" )
|
string(
|
||||||
list( APPEND calamares_i18n_ts_filelist "${CMAKE_CURRENT_SOURCE_DIR}/${_qrt_SUBDIRECTORY}/${basename}_${lang}.ts" )
|
APPEND
|
||||||
|
calamares_i18n_qrc_content
|
||||||
|
"<file>${basename}_${lang}.qm</file>"
|
||||||
|
)
|
||||||
|
list(
|
||||||
|
APPEND
|
||||||
|
calamares_i18n_ts_filelist
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${_qrt_SUBDIRECTORY}/${basename}_${lang}.ts"
|
||||||
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
configure_file( ${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${translations_qrc_infile} @ONLY )
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in
|
||||||
|
${translations_qrc_infile}
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
qt5_add_translation(QM_FILES ${calamares_i18n_ts_filelist})
|
qt5_add_translation(QM_FILES ${calamares_i18n_ts_filelist})
|
||||||
|
|
||||||
# Run the resource compiler (rcc_options should already be set)
|
# Run the resource compiler (rcc_options should already be set)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${translations_qrc_outfile}
|
OUTPUT ${translations_qrc_outfile}
|
||||||
COMMAND "${Qt5Core_RCC_EXECUTABLE}"
|
COMMAND "${Qt5Core_RCC_EXECUTABLE}"
|
||||||
ARGS ${rcc_options} --format-version 1 -name ${basename} -o ${translations_qrc_outfile} ${translations_qrc_infile}
|
ARGS
|
||||||
|
${rcc_options}
|
||||||
|
--format-version
|
||||||
|
1
|
||||||
|
-name
|
||||||
|
${basename}
|
||||||
|
-o
|
||||||
|
${translations_qrc_outfile}
|
||||||
|
${translations_qrc_infile}
|
||||||
MAIN_DEPENDENCY ${translations_qrc_infile}
|
MAIN_DEPENDENCY ${translations_qrc_infile}
|
||||||
DEPENDS ${QM_FILES}
|
DEPENDS ${QM_FILES}
|
||||||
)
|
)
|
||||||
@ -314,11 +347,15 @@ calamares_add_test(
|
|||||||
utils/TestPaths.cpp
|
utils/TestPaths.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# This is not an actual test, it's a test / demo application
|
# This is not an actual test, it's a test / demo application
|
||||||
# for experimenting with GeoIP.
|
# for experimenting with GeoIP.
|
||||||
add_executable(test_geoip geoip/test_geoip.cpp ${geoip_src})
|
add_executable(test_geoip geoip/test_geoip.cpp ${geoip_src})
|
||||||
target_link_libraries( test_geoip Calamares::calamares Qt5::Network yamlcpp::yamlcpp )
|
target_link_libraries(
|
||||||
|
test_geoip
|
||||||
|
Calamares::calamares
|
||||||
|
Qt5::Network
|
||||||
|
yamlcpp::yamlcpp
|
||||||
|
)
|
||||||
calamares_automoc( test_geoip )
|
calamares_automoc( test_geoip )
|
||||||
|
|
||||||
if(Qt5DBus_FOUND)
|
if(Qt5DBus_FOUND)
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
# view modules, view steps, widgets, and branding.
|
# view modules, view steps, widgets, and branding.
|
||||||
|
|
||||||
# The UI libs use the non-UI library
|
# The UI libs use the non-UI library
|
||||||
include_directories( ${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR} )
|
include_directories(
|
||||||
|
${CMAKE_SOURCE_DIR}/src/libcalamares
|
||||||
|
${CMAKE_BINARY_DIR}/src/libcalamares
|
||||||
|
${CMAKE_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
set(calamaresui_SOURCES
|
set(calamaresui_SOURCES
|
||||||
modulesystem/CppJobModule.cpp
|
modulesystem/CppJobModule.cpp
|
||||||
@ -16,16 +20,13 @@ set( calamaresui_SOURCES
|
|||||||
modulesystem/ModuleManager.cpp
|
modulesystem/ModuleManager.cpp
|
||||||
modulesystem/ProcessJobModule.cpp
|
modulesystem/ProcessJobModule.cpp
|
||||||
modulesystem/ViewModule.cpp
|
modulesystem/ViewModule.cpp
|
||||||
|
|
||||||
utils/CalamaresUtilsGui.cpp
|
utils/CalamaresUtilsGui.cpp
|
||||||
utils/ImageRegistry.cpp
|
utils/ImageRegistry.cpp
|
||||||
utils/Paste.cpp
|
utils/Paste.cpp
|
||||||
|
|
||||||
viewpages/BlankViewStep.cpp
|
viewpages/BlankViewStep.cpp
|
||||||
viewpages/ExecutionViewStep.cpp
|
viewpages/ExecutionViewStep.cpp
|
||||||
viewpages/Slideshow.cpp
|
viewpages/Slideshow.cpp
|
||||||
viewpages/ViewStep.cpp
|
viewpages/ViewStep.cpp
|
||||||
|
|
||||||
widgets/ClickableLabel.cpp
|
widgets/ClickableLabel.cpp
|
||||||
widgets/ErrorDialog.cpp
|
widgets/ErrorDialog.cpp
|
||||||
widgets/FixedAspectRatioLabel.cpp
|
widgets/FixedAspectRatioLabel.cpp
|
||||||
@ -34,7 +35,6 @@ set( calamaresui_SOURCES
|
|||||||
widgets/TranslationFix.cpp
|
widgets/TranslationFix.cpp
|
||||||
widgets/WaitingWidget.cpp
|
widgets/WaitingWidget.cpp
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
|
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
|
||||||
|
|
||||||
Branding.cpp
|
Branding.cpp
|
||||||
ViewManager.cpp
|
ViewManager.cpp
|
||||||
)
|
)
|
||||||
@ -45,13 +45,13 @@ mark_thirdparty_code(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_PYTHON)
|
if(WITH_PYTHON)
|
||||||
list( APPEND calamaresui_SOURCES
|
list(APPEND calamaresui_SOURCES modulesystem/PythonJobModule.cpp)
|
||||||
modulesystem/PythonJobModule.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_PYTHONQT)
|
if(WITH_PYTHONQT)
|
||||||
list( APPEND calamaresui_SOURCES
|
list(
|
||||||
|
APPEND
|
||||||
|
calamaresui_SOURCES
|
||||||
modulesystem/PythonQtViewModule.cpp
|
modulesystem/PythonQtViewModule.cpp
|
||||||
utils/PythonQtUtils.cpp
|
utils/PythonQtUtils.cpp
|
||||||
viewpages/PythonQtJob.cpp
|
viewpages/PythonQtJob.cpp
|
||||||
@ -62,10 +62,7 @@ if( WITH_PYTHONQT )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_QML)
|
if(WITH_QML)
|
||||||
list( APPEND calamaresui_SOURCES
|
list(APPEND calamaresui_SOURCES utils/Qml.cpp viewpages/QmlViewStep.cpp)
|
||||||
utils/Qml.cpp
|
|
||||||
viewpages/QmlViewStep.cpp
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
calamares_add_library(calamaresui
|
calamares_add_library(calamaresui
|
||||||
@ -85,8 +82,14 @@ if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 )
|
|||||||
endif()
|
endif()
|
||||||
if(WITH_PYTHONQT)
|
if(WITH_PYTHONQT)
|
||||||
# *_DIRS because we also use extensions
|
# *_DIRS because we also use extensions
|
||||||
target_include_directories( calamaresui PRIVATE ${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIRS} )
|
target_include_directories(
|
||||||
target_link_libraries( calamaresui PRIVATE ${PYTHON_LIBRARIES} ${PYTHONQT_LIBRARIES} )
|
calamaresui
|
||||||
|
PRIVATE ${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
calamaresui
|
||||||
|
PRIVATE ${PYTHON_LIBRARIES} ${PYTHONQT_LIBRARIES}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(WITH_QML)
|
if(WITH_QML)
|
||||||
target_link_libraries(calamaresui PUBLIC Qt5::QuickWidgets)
|
target_link_libraries(calamaresui PUBLIC Qt5::QuickWidgets)
|
||||||
@ -94,7 +97,6 @@ endif()
|
|||||||
|
|
||||||
add_library(Calamares::calamaresui ALIAS calamaresui)
|
add_library(Calamares::calamaresui ALIAS calamaresui)
|
||||||
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -103,12 +105,7 @@ add_library(Calamares::calamaresui ALIAS calamaresui)
|
|||||||
# where libcalamares and libcalamaresui live in different branches,
|
# where libcalamares and libcalamaresui live in different branches,
|
||||||
# we're going to glom it all together in the installed headers location.
|
# we're going to glom it all together in the installed headers location.
|
||||||
|
|
||||||
install(
|
install(FILES Branding.h ViewManager.h DESTINATION include/libcalamares)
|
||||||
FILES
|
|
||||||
Branding.h
|
|
||||||
ViewManager.h
|
|
||||||
DESTINATION include/libcalamares
|
|
||||||
)
|
|
||||||
|
|
||||||
# Install each subdir-worth of header files
|
# Install each subdir-worth of header files
|
||||||
foreach(subdir modulesystem utils viewpages widgets)
|
foreach(subdir modulesystem utils viewpages widgets)
|
||||||
|
@ -26,19 +26,30 @@ foreach( SUBDIRECTORY ${SUBDIRECTORIES} )
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# TODO:3.3: Use FindPython3
|
# TODO:3.3: Use FindPython3
|
||||||
if ( BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE )
|
if(
|
||||||
|
BUILD_TESTING
|
||||||
|
AND BUILD_SCHEMA_TESTING
|
||||||
|
AND PYTHONINTERP_FOUND
|
||||||
|
AND PYTHON_EXECUTABLE
|
||||||
|
)
|
||||||
# The tests for each config file are independent of whether the
|
# The tests for each config file are independent of whether the
|
||||||
# module is enabled or not: the config file should match its schema
|
# module is enabled or not: the config file should match its schema
|
||||||
# regardless.
|
# regardless.
|
||||||
foreach(SUBDIRECTORY ${SUBDIRECTORIES})
|
foreach(SUBDIRECTORY ${SUBDIRECTORIES})
|
||||||
set( _schema_file "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${SUBDIRECTORY}.schema.yaml" )
|
set(_schema_file
|
||||||
set( _conf_file "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${SUBDIRECTORY}.conf" )
|
"${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${SUBDIRECTORY}.schema.yaml"
|
||||||
|
)
|
||||||
|
set(_conf_file
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${SUBDIRECTORY}.conf"
|
||||||
|
)
|
||||||
if(EXISTS "${_schema_file}" AND EXISTS "${_conf_file}")
|
if(EXISTS "${_schema_file}" AND EXISTS "${_conf_file}")
|
||||||
add_test(
|
add_test(
|
||||||
NAME validate-${SUBDIRECTORY}
|
NAME validate-${SUBDIRECTORY}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" "${_conf_file}"
|
COMMAND
|
||||||
|
${PYTHON_EXECUTABLE}
|
||||||
|
"${CMAKE_SOURCE_DIR}/ci/configvalidator.py"
|
||||||
|
"${_schema_file}" "${_conf_file}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -10,7 +10,10 @@ find_package( KF5WidgetsAddons CONFIG )
|
|||||||
include(KPMcoreHelper)
|
include(KPMcoreHelper)
|
||||||
|
|
||||||
if(KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND)
|
if(KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND)
|
||||||
include_directories( ${KPMCORE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/modules/partition )
|
include_directories(
|
||||||
|
${KPMCORE_INCLUDE_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/src/modules/partition
|
||||||
|
)
|
||||||
|
|
||||||
# The PartitionIterator is a small class, and it's easiest -- but also a
|
# The PartitionIterator is a small class, and it's easiest -- but also a
|
||||||
# gross hack -- to just compile it again from the partition module tree.
|
# gross hack -- to just compile it again from the partition module tree.
|
||||||
|
@ -10,11 +10,13 @@ set( kf5_ver 5.41 )
|
|||||||
find_package(KF5Service ${kf5_ver})
|
find_package(KF5Service ${kf5_ver})
|
||||||
find_package(KF5Parts ${kf5_ver})
|
find_package(KF5Parts ${kf5_ver})
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
KF5Service PROPERTIES
|
KF5Service
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "For finding KDE services at runtime"
|
PURPOSE "For finding KDE services at runtime"
|
||||||
)
|
)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
KF5Parts PROPERTIES
|
KF5Parts
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "For finding KDE parts at runtime"
|
PURPOSE "For finding KDE parts at runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,12 +17,16 @@ if( DEBUG_TIMEZONES )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt5Location CONFIG)
|
find_package(Qt5Location CONFIG)
|
||||||
set_package_properties(Qt5Location PROPERTIES
|
set_package_properties(
|
||||||
|
Qt5Location
|
||||||
|
PROPERTIES
|
||||||
DESCRIPTION "Used for rendering the map"
|
DESCRIPTION "Used for rendering the map"
|
||||||
TYPE RUNTIME
|
TYPE RUNTIME
|
||||||
)
|
)
|
||||||
find_package(Qt5Positioning CONFIG)
|
find_package(Qt5Positioning CONFIG)
|
||||||
set_package_properties(Qt5Positioning PROPERTIES
|
set_package_properties(
|
||||||
|
Qt5Positioning
|
||||||
|
PROPERTIES
|
||||||
DESCRIPTION "Used for GeoLocation and GeoCoding"
|
DESCRIPTION "Used for GeoLocation and GeoCoding"
|
||||||
TYPE RUNTIME
|
TYPE RUNTIME
|
||||||
)
|
)
|
||||||
|
@ -32,4 +32,3 @@ calamares_add_test(
|
|||||||
LIBRARIES
|
LIBRARIES
|
||||||
Qt5::Gui
|
Qt5::Gui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +11,11 @@ set( _extra_src "" )
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
||||||
option( WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON )
|
option(
|
||||||
|
WITH_APPDATA
|
||||||
|
"Support appdata: items in PackageChooser (requires QtXml)"
|
||||||
|
ON
|
||||||
|
)
|
||||||
if(WITH_APPDATA)
|
if(WITH_APPDATA)
|
||||||
find_package(Qt5 COMPONENTS Xml)
|
find_package(Qt5 COMPONENTS Xml)
|
||||||
if(Qt5Xml_FOUND)
|
if(Qt5Xml_FOUND)
|
||||||
@ -24,11 +28,16 @@ endif()
|
|||||||
### OPTIONAL AppStream support in PackageModel
|
### OPTIONAL AppStream support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option( WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON )
|
option(
|
||||||
|
WITH_APPSTREAM
|
||||||
|
"Support appstream: items in PackageChooser (requires libappstream-qt)"
|
||||||
|
ON
|
||||||
|
)
|
||||||
if(WITH_APPSTREAM)
|
if(WITH_APPSTREAM)
|
||||||
find_package(AppStreamQt)
|
find_package(AppStreamQt)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
AppStreamQt PROPERTIES
|
AppStreamQt
|
||||||
|
PROPERTIES
|
||||||
DESCRIPTION "Support for AppStream (cache) data"
|
DESCRIPTION "Support for AppStream (cache) data"
|
||||||
URL "https://github.com/ximion/appstream"
|
URL "https://github.com/ximion/appstream"
|
||||||
PURPOSE "AppStream provides package data"
|
PURPOSE "AppStream provides package data"
|
||||||
|
@ -22,7 +22,11 @@ include_directories( ${_packagechooser} )
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
# TODO:3.3:WITH->BUILD (this doesn't affect the ABI offered by Calamares)
|
||||||
option( WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON )
|
option(
|
||||||
|
WITH_APPDATA
|
||||||
|
"Support appdata: items in PackageChooser (requires QtXml)"
|
||||||
|
ON
|
||||||
|
)
|
||||||
if(WITH_APPDATA)
|
if(WITH_APPDATA)
|
||||||
find_package(Qt5 COMPONENTS Xml)
|
find_package(Qt5 COMPONENTS Xml)
|
||||||
if(Qt5Xml_FOUND)
|
if(Qt5Xml_FOUND)
|
||||||
@ -35,11 +39,16 @@ endif()
|
|||||||
### OPTIONAL AppStream support in PackageModel
|
### OPTIONAL AppStream support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option( WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON )
|
option(
|
||||||
|
WITH_APPSTREAM
|
||||||
|
"Support appstream: items in PackageChooser (requires libappstream-qt)"
|
||||||
|
ON
|
||||||
|
)
|
||||||
if(WITH_APPSTREAM)
|
if(WITH_APPSTREAM)
|
||||||
find_package(AppStreamQt)
|
find_package(AppStreamQt)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
AppStreamQt PROPERTIES
|
AppStreamQt
|
||||||
|
PROPERTIES
|
||||||
DESCRIPTION "Support for AppStream (cache) data"
|
DESCRIPTION "Support for AppStream (cache) data"
|
||||||
URL "https://github.com/ximion/appstream"
|
URL "https://github.com/ximion/appstream"
|
||||||
PURPOSE "AppStream provides package data"
|
PURPOSE "AppStream provides package data"
|
||||||
|
@ -19,7 +19,11 @@
|
|||||||
# useful for debugging simulated installations that don't need to
|
# useful for debugging simulated installations that don't need to
|
||||||
# mount the target filesystems.
|
# mount the target filesystems.
|
||||||
option(DEBUG_PARTITION_UNSAFE "Allow unsafe partitioning choices." OFF)
|
option(DEBUG_PARTITION_UNSAFE "Allow unsafe partitioning choices." OFF)
|
||||||
option( DEBUG_PARTITION_BAIL_OUT "Unsafe partitioning will error out on exec." ON )
|
option(
|
||||||
|
DEBUG_PARTITION_BAIL_OUT
|
||||||
|
"Unsafe partitioning will error out on exec."
|
||||||
|
ON
|
||||||
|
)
|
||||||
option(DEBUG_PARTITION_SKIP "Don't actually do any partitioning." OFF)
|
option(DEBUG_PARTITION_SKIP "Don't actually do any partitioning." OFF)
|
||||||
|
|
||||||
# This is very chatty, useful mostly if you don't know what KPMCore offers.
|
# This is very chatty, useful mostly if you don't know what KPMCore offers.
|
||||||
@ -130,4 +134,3 @@ else()
|
|||||||
calamares_skip_module( "partition (missing dependencies for KPMcore)" )
|
calamares_skip_module( "partition (missing dependencies for KPMcore)" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ calamares_add_test(
|
|||||||
DEFINITIONS ${_partition_defs}
|
DEFINITIONS ${_partition_defs}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
calamares_add_test(
|
calamares_add_test(
|
||||||
partitioncreatelayoutstest
|
partitioncreatelayoutstest
|
||||||
SOURCES
|
SOURCES
|
||||||
|
@ -11,19 +11,22 @@ set( lnf_ver 5.41 )
|
|||||||
|
|
||||||
find_package(KF5Config ${lnf_ver})
|
find_package(KF5Config ${lnf_ver})
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
KF5Config PROPERTIES
|
KF5Config
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "For finding default Plasma Look-and-Feel"
|
PURPOSE "For finding default Plasma Look-and-Feel"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(KF5Plasma ${lnf_ver})
|
find_package(KF5Plasma ${lnf_ver})
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
KF5Plasma PROPERTIES
|
KF5Plasma
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "For Plasma Look-and-Feel selection"
|
PURPOSE "For Plasma Look-and-Feel selection"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(KF5Package ${lnf_ver})
|
find_package(KF5Package ${lnf_ver})
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
KF5Package PROPERTIES
|
KF5Package
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "For Plasma Look-and-Feel selection"
|
PURPOSE "For Plasma Look-and-Feel selection"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -49,7 +52,10 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND )
|
|||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
if(KF5Config_FOUND)
|
if(KF5Config_FOUND)
|
||||||
target_compile_definitions(calamares_viewmodule_plasmalnf PRIVATE WITH_KCONFIG)
|
target_compile_definitions(
|
||||||
|
calamares_viewmodule_plasmalnf
|
||||||
|
PRIVATE WITH_KCONFIG
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
calamares_skip_module( "plasmalnf (missing requirements)" )
|
calamares_skip_module( "plasmalnf (missing requirements)" )
|
||||||
|
@ -11,7 +11,8 @@ set( USER_EXTRA_LIB )
|
|||||||
|
|
||||||
find_package(LibPWQuality)
|
find_package(LibPWQuality)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
LibPWQuality PROPERTIES
|
LibPWQuality
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "Extra checks of password quality"
|
PURPOSE "Extra checks of password quality"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,7 +24,8 @@ endif()
|
|||||||
|
|
||||||
find_package(ICU COMPONENTS uc i18n)
|
find_package(ICU COMPONENTS uc i18n)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
ICU PROPERTIES
|
ICU
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "Transliteration support for full name to username conversion"
|
PURPOSE "Transliteration support for full name to username conversion"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../users )
|
|||||||
|
|
||||||
find_package(LibPWQuality)
|
find_package(LibPWQuality)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
LibPWQuality PROPERTIES
|
LibPWQuality
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "Extra checks of password quality"
|
PURPOSE "Extra checks of password quality"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -31,7 +32,8 @@ endif()
|
|||||||
#needed for ${_users}/Config.cpp
|
#needed for ${_users}/Config.cpp
|
||||||
find_package(ICU COMPONENTS uc i18n)
|
find_package(ICU COMPONENTS uc i18n)
|
||||||
set_package_properties(
|
set_package_properties(
|
||||||
ICU PROPERTIES
|
ICU
|
||||||
|
PROPERTIES
|
||||||
PURPOSE "Transliteration support for full name to username conversion"
|
PURPOSE "Transliteration support for full name to username conversion"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
#
|
#
|
||||||
set(CALA_WEBVIEW_LINK_LIBRARIES "")
|
set(CALA_WEBVIEW_LINK_LIBRARIES "")
|
||||||
|
|
||||||
option( WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF)
|
option(
|
||||||
|
WEBVIEW_FORCE_WEBKIT
|
||||||
|
"Always build webview with WebKit instead of WebEngine regardless of Qt version."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
|
||||||
set(_reason "")
|
set(_reason "")
|
||||||
|
|
||||||
@ -15,13 +19,8 @@ if ( Qt5Core_VERSION VERSION_LESS 5.6 OR WEBVIEW_FORCE_WEBKIT )
|
|||||||
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebKit WebKitWidgets)
|
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebKit WebKitWidgets)
|
||||||
|
|
||||||
if(Qt5WebKit_FOUND AND Qt5WebKitWidgets_FOUND)
|
if(Qt5WebKit_FOUND AND Qt5WebKitWidgets_FOUND)
|
||||||
list( APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES
|
list(APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES ${QT_QTWEBKIT_INCLUDE_DIR})
|
||||||
${QT_QTWEBKIT_INCLUDE_DIR}
|
list(APPEND CALA_WEBVIEW_LINK_LIBRARIES Qt5::WebKit Qt5::WebKitWidgets)
|
||||||
)
|
|
||||||
list( APPEND CALA_WEBVIEW_LINK_LIBRARIES
|
|
||||||
Qt5::WebKit
|
|
||||||
Qt5::WebKitWidgets
|
|
||||||
)
|
|
||||||
set(WEBVIEW_WITH_WEBKIT 1)
|
set(WEBVIEW_WITH_WEBKIT 1)
|
||||||
else()
|
else()
|
||||||
set(_reason "No suitable WebKit")
|
set(_reason "No suitable WebKit")
|
||||||
@ -31,10 +30,14 @@ else()
|
|||||||
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebEngine WebEngineWidgets)
|
find_package(Qt5 ${QT_VERSION} CONFIG COMPONENTS WebEngine WebEngineWidgets)
|
||||||
|
|
||||||
if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
||||||
list( APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES
|
list(
|
||||||
|
APPEND
|
||||||
|
CALA_WEBVIEW_INCLUDE_DIRECTORIES
|
||||||
${QT_QTWEBENGINE_INCLUDE_DIR}
|
${QT_QTWEBENGINE_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
list( APPEND CALA_WEBVIEW_LINK_LIBRARIES
|
list(
|
||||||
|
APPEND
|
||||||
|
CALA_WEBVIEW_LINK_LIBRARIES
|
||||||
Qt5::WebEngine
|
Qt5::WebEngine
|
||||||
Qt5::WebEngineWidgets
|
Qt5::WebEngineWidgets
|
||||||
)
|
)
|
||||||
@ -45,8 +48,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT _reason)
|
if(NOT _reason)
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in
|
configure_file(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h )
|
${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h
|
||||||
|
)
|
||||||
|
|
||||||
calamares_add_plugin(webview
|
calamares_add_plugin(webview
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
|
@ -29,10 +29,7 @@ else()
|
|||||||
add_definitions(-DWITHOUT_LIBPARTED)
|
add_definitions(-DWITHOUT_LIBPARTED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( CHECKER_SOURCES
|
set(CHECKER_SOURCES ${_welcome}/checker/GeneralRequirements.cpp ${PARTMAN_SRC})
|
||||||
${_welcome}/checker/GeneralRequirements.cpp
|
|
||||||
${PARTMAN_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
calamares_add_plugin(welcomeq
|
calamares_add_plugin(welcomeq
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
|
@ -10,4 +10,3 @@ calamares_add_plugin( zfs
|
|||||||
ZfsJob.cpp
|
ZfsJob.cpp
|
||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,26 +14,43 @@
|
|||||||
# and install them into share/calamares/qml/calamares
|
# and install them into share/calamares/qml/calamares
|
||||||
file(GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
|
file(GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*")
|
||||||
foreach(SUBDIRECTORY ${SUBDIRECTORIES})
|
foreach(SUBDIRECTORY ${SUBDIRECTORIES})
|
||||||
if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}"
|
if(
|
||||||
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/qmldir" )
|
IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}"
|
||||||
|
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/qmldir"
|
||||||
|
)
|
||||||
set(QML_DIR share/calamares/qml)
|
set(QML_DIR share/calamares/qml)
|
||||||
set(QML_MODULE_DESTINATION ${QML_DIR}/calamares/${SUBDIRECTORY})
|
set(QML_MODULE_DESTINATION ${QML_DIR}/calamares/${SUBDIRECTORY})
|
||||||
|
|
||||||
# We glob all the files inside the subdirectory, and we make sure they are
|
# We glob all the files inside the subdirectory, and we make sure they are
|
||||||
# synced with the bindir structure and installed.
|
# synced with the bindir structure and installed.
|
||||||
file( GLOB QML_MODULE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${SUBDIRECTORY}/*" )
|
file(
|
||||||
|
GLOB QML_MODULE_FILES
|
||||||
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}
|
||||||
|
"${SUBDIRECTORY}/*"
|
||||||
|
)
|
||||||
foreach(QML_MODULE_FILE ${QML_MODULE_FILES})
|
foreach(QML_MODULE_FILE ${QML_MODULE_FILES})
|
||||||
if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE} )
|
if(
|
||||||
configure_file( ${SUBDIRECTORY}/${QML_MODULE_FILE} ${SUBDIRECTORY}/${QML_MODULE_FILE} COPYONLY )
|
NOT
|
||||||
|
IS_DIRECTORY
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE}
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
${SUBDIRECTORY}/${QML_MODULE_FILE}
|
||||||
|
${SUBDIRECTORY}/${QML_MODULE_FILE}
|
||||||
|
COPYONLY
|
||||||
|
)
|
||||||
|
|
||||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE}
|
install(
|
||||||
DESTINATION ${QML_MODULE_DESTINATION} )
|
FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE}
|
||||||
|
DESTINATION ${QML_MODULE_DESTINATION}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
message( "-- ${BoldYellow}Configured QML module: ${BoldRed}calamares.${SUBDIRECTORY}${ColorReset}" )
|
message(
|
||||||
|
"-- ${BoldYellow}Configured QML module: ${BoldRed}calamares.${SUBDIRECTORY}${ColorReset}"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user