source: calamares/trunk/fuentes/src/modules/users/CMakeLists.txt @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.4 KB
Line 
1find_package(ECM ${ECM_VERSION} NO_MODULE)
2if( ECM_FOUND )
3    include( ECMAddTests )
4endif()
5
6find_package( Qt5 COMPONENTS Core Test REQUIRED )
7find_package( Crypt REQUIRED )
8
9# Add optional libraries here
10set( USER_EXTRA_LIB )
11
12find_package( LibPWQuality )
13set_package_properties(
14    LibPWQuality PROPERTIES
15    PURPOSE "Extra checks of password quality"
16)
17
18if( LibPWQuality_FOUND )
19    list( APPEND USER_EXTRA_LIB ${LibPWQuality_LIBRARIES} )
20    include_directories( ${LibPWQuality_INCLUDE_DIRS} )
21    add_definitions( -DCHECK_PWQUALITY -DHAVE_LIBPWQUALITY )
22endif()
23
24include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
25
26calamares_add_plugin( users
27    TYPE viewmodule
28    EXPORT_MACRO PLUGINDLLEXPORT_PRO
29    SOURCES
30        CreateUserJob.cpp
31        SetPasswordJob.cpp
32        UsersViewStep.cpp
33        UsersPage.cpp
34        SetHostNameJob.cpp
35        CheckPWQuality.cpp
36    UI
37        page_usersetup.ui
38    RESOURCES
39        users.qrc
40    LINK_PRIVATE_LIBRARIES
41        calamaresui
42        ${CRYPT_LIBRARIES}
43        ${USER_EXTRA_LIB}
44    SHARED_LIB
45)
46
47if( ECM_FOUND )
48    ecm_add_test(
49            PasswordTests.cpp
50            SetPasswordJob.cpp
51        TEST_NAME
52            passwordtest
53        LINK_LIBRARIES
54            ${CALAMARES_LIBRARIES}
55            Qt5::Core
56            Qt5::Test
57            ${CRYPT_LIBRARIES}
58    )
59    set_target_properties( passwordtest PROPERTIES AUTOMOC TRUE )
60endif()
Note: See TracBrowser for help on using the repository browser.