calamares/src/modules/users/CMakeLists.txt

61 lines
1.4 KiB
CMake
Raw Normal View History

find_package(ECM ${ECM_VERSION} NO_MODULE)
2017-06-20 23:43:50 +02:00
if( ECM_FOUND )
include( ECMAddTests )
endif()
find_package( Qt5 COMPONENTS Core Test REQUIRED )
2017-09-13 22:24:30 +02:00
find_package( Crypt REQUIRED )
# Add optional libraries here
set( USER_EXTRA_LIB )
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()
2017-06-20 23:43:50 +02:00
include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
2014-07-31 14:52:05 +02:00
calamares_add_plugin( users
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
2014-07-31 14:53:46 +02:00
CreateUserJob.cpp
SetPasswordJob.cpp
2014-07-31 14:52:05 +02:00
UsersViewStep.cpp
UsersPage.cpp
2014-10-21 18:59:02 +02:00
SetHostNameJob.cpp
CheckPWQuality.cpp
2014-07-31 14:52:05 +02:00
UI
page_usersetup.ui
RESOURCES
users.qrc
2016-12-07 16:37:29 +01:00
LINK_PRIVATE_LIBRARIES
2014-07-31 14:52:05 +02:00
calamaresui
${CRYPT_LIBRARIES}
${USER_EXTRA_LIB}
2014-07-31 14:52:05 +02:00
SHARED_LIB
)
2017-06-20 23:43:50 +02:00
if( ECM_FOUND )
ecm_add_test(
PasswordTests.cpp
SetPasswordJob.cpp
TEST_NAME
passwordtest
LINK_LIBRARIES
${CALAMARES_LIBRARIES}
Qt5::Core
Qt5::Test
${CRYPT_LIBRARIES}
)
set_target_properties( passwordtest PROPERTIES AUTOMOC TRUE )
endif()