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
|
|
|
|
#
|
2020-08-11 13:46:05 +02:00
|
|
|
if( NOT WITH_QML )
|
|
|
|
calamares_skip_module( "usersq (QML is not supported in this build)" )
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core DBus Network )
|
|
|
|
find_package( Crypt REQUIRED )
|
|
|
|
|
|
|
|
# Add optional libraries here
|
|
|
|
set( USER_EXTRA_LIB )
|
|
|
|
set( _users ${CMAKE_CURRENT_SOURCE_DIR}/../users )
|
|
|
|
|
|
|
|
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_users} )
|
|
|
|
|
|
|
|
find_package( LibPWQuality )
|
|
|
|
set_package_properties(
|
|
|
|
LibPWQuality PROPERTIES
|
|
|
|
PURPOSE "Extra checks of password quality"
|
|
|
|
)
|
|
|
|
|
|
|
|
if( LibPWQuality_FOUND )
|
|
|
|
list( APPEND USER_EXTRA_LIB ${LibPWQuality_LIBRARIES} )
|
|
|
|
include_directories( ${LibPWQuality_INCLUDE_DIRS} )
|
|
|
|
add_definitions( -DCHECK_PWQUALITY -DHAVE_LIBPWQUALITY )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
calamares_add_plugin( usersq
|
|
|
|
TYPE viewmodule
|
|
|
|
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
|
|
|
SOURCES
|
2020-10-21 14:46:07 +02:00
|
|
|
${_users}/CheckPWQuality.cpp
|
|
|
|
${_users}/Config.cpp
|
|
|
|
${_users}/CreateUserJob.cpp
|
|
|
|
${_users}/MiscJobs.cpp
|
|
|
|
${_users}/SetHostNameJob.cpp
|
2020-08-11 13:46:05 +02:00
|
|
|
${_users}/SetPasswordJob.cpp
|
|
|
|
UsersQmlViewStep.cpp
|
|
|
|
RESOURCES
|
|
|
|
usersq.qrc
|
|
|
|
LINK_PRIVATE_LIBRARIES
|
|
|
|
calamaresui
|
|
|
|
${CRYPT_LIBRARIES}
|
|
|
|
${USER_EXTRA_LIB}
|
|
|
|
Qt5::DBus
|
|
|
|
SHARED_LIB
|
|
|
|
)
|