[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.
This commit is contained in:
Adriaan de Groot 2020-08-18 11:41:43 +02:00
parent 2c72524f29
commit 3ecab4bedb

View File

@ -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()
)