Compare commits
2 Commits
5b0b180cef
...
ae75028c2f
Author | SHA1 | Date |
---|---|---|
Sebastian Lipponer | ae75028c2f | |
Sebastian Lipponer | abb78327e5 |
|
@ -611,6 +611,12 @@ if(UNIX)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
find_library(ZXCVBN_LIBRARIES zxcvbn)
|
||||
if(NOT ZXCVBN_LIBRARIES)
|
||||
add_subdirectory(src/zxcvbn)
|
||||
set(ZXCVBN_LIBRARIES zxcvbn)
|
||||
endif(NOT ZXCVBN_LIBRARIES)
|
||||
|
||||
include_directories(SYSTEM ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
|
@ -16,20 +16,6 @@
|
|||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
find_library(ZXCVBN_LIBRARIES zxcvbn)
|
||||
if(NOT ZXCVBN_LIBRARIES)
|
||||
add_library(zxcvbn STATIC zxcvbn/zxcvbn.c)
|
||||
# Disable error-level shadow issues
|
||||
if(CC_HAS_Wshadow_compatible_local)
|
||||
set_property(SOURCE zxcvbn/zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow-compatible-local")
|
||||
endif()
|
||||
if(CC_HAS_Wshadow_local)
|
||||
set_property(SOURCE zxcvbn/zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow-local")
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zxcvbn)
|
||||
set(ZXCVBN_LIBRARIES zxcvbn)
|
||||
endif(NOT ZXCVBN_LIBRARIES)
|
||||
|
||||
set(keepassx_SOURCES
|
||||
core/Alloc.cpp
|
||||
core/AutoTypeAssociations.cpp
|
||||
|
|
|
@ -45,7 +45,7 @@ set(cli_SOURCES
|
|||
Show.cpp)
|
||||
|
||||
add_library(cli STATIC ${cli_SOURCES})
|
||||
target_link_libraries(cli Qt5::Core)
|
||||
target_link_libraries(cli ${ZXCVBN_LIBRARIES} Qt5::Core)
|
||||
|
||||
find_package(Readline)
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
add_library(zxcvbn STATIC zxcvbn.c)
|
||||
# Disable error-level shadow issues
|
||||
if(CC_HAS_Wshadow_compatible_local)
|
||||
set_property(SOURCE zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow-compatible-local")
|
||||
endif()
|
||||
if(CC_HAS_Wshadow_local)
|
||||
set_property(SOURCE zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow-local")
|
||||
endif()
|
||||
target_include_directories(zxcvbn PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
@ -249,7 +249,7 @@ if(WITH_XC_NETWORKING OR WITH_XC_BROWSER)
|
|||
endif()
|
||||
|
||||
add_unit_test(NAME testcli SOURCES TestCli.cpp
|
||||
LIBS testsupport cli ${TEST_LIBRARIES})
|
||||
LIBS testsupport cli ${ZXCVBN_LIBRARIES} ${TEST_LIBRARIES})
|
||||
target_compile_definitions(testcli PRIVATE KEEPASSX_CLI_PATH="$<TARGET_FILE:keepassxc-cli>")
|
||||
|
||||
if(WITH_GUI_TESTS)
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "crypto/Crypto.h"
|
||||
#include "keys/FileKey.h"
|
||||
#include "keys/drivers/YubiKey.h"
|
||||
#include "zxcvbn/zxcvbn.h"
|
||||
|
||||
#include "cli/Add.h"
|
||||
#include "cli/AddGroup.h"
|
||||
|
@ -59,6 +58,7 @@
|
|||
#include <QSignalSpy>
|
||||
#include <QTest>
|
||||
#include <QtConcurrent>
|
||||
#include <zxcvbn.h>
|
||||
|
||||
QTEST_MAIN(TestCli)
|
||||
|
||||
|
|
Loading…
Reference in New Issue