From 3ecab4bedbe4fe97384da1c252a298b15d04ab5f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 18 Aug 2020 11:41:43 +0200 Subject: [PATCH] [users] Fix test building - now Config can create jobs, tests that consume Config need to build the jobs as well; re-jig CMakeLists to make those a little easier. --- src/modules/users/CMakeLists.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/modules/users/CMakeLists.txt b/src/modules/users/CMakeLists.txt index 95b3a9697..7fffc1eea 100644 --- a/src/modules/users/CMakeLists.txt +++ b/src/modules/users/CMakeLists.txt @@ -18,17 +18,24 @@ endif() include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ) +set( JOB_SRC + CreateUserJob.cpp + SetPasswordJob.cpp + SetHostNameJob.cpp +) +set( CONFIG_SRC + CheckPWQuality.cpp + Config.cpp +) + calamares_add_plugin( users TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES - CreateUserJob.cpp - SetPasswordJob.cpp UsersViewStep.cpp UsersPage.cpp - SetHostNameJob.cpp - CheckPWQuality.cpp - Config.cpp + ${JOB_SRC} + ${CONFIG_SRC} UI page_usersetup.ui RESOURCES @@ -63,15 +70,17 @@ calamares_add_test( TestSetHostNameJob.cpp SetHostNameJob.cpp LIBRARIES - Qt5::DBus + Qt5::DBus # HostName job can use DBus to systemd ) calamares_add_test( userstest SOURCES Tests.cpp - Config.cpp - CheckPWQuality.cpp + ${JOB_SRC} + ${CONFIG_SRC} LIBRARIES ${USER_EXTRA_LIB} + Qt5::DBus # HostName job can use DBus to systemd + ${CRYPT_LIBRARIES} # SetPassword job uses crypt() )