From e5f61e7bc4b5112f259676066279d34975ef6e40 Mon Sep 17 00:00:00 2001 From: Felix Berlakovich Date: Wed, 11 Feb 2026 17:12:06 +0100 Subject: [PATCH] Revert unrelated build changes from AutoFill commit --- CMakeLists.txt | 2 +- src/autotype/mac/CMakeLists.txt | 5 ++--- src/cli/CMakeLists.txt | 21 +++++++++++---------- src/gui/ApplicationSettingsWidget.cpp | 1 - src/thirdparty/zxcvbn/CMakeLists.txt | 3 --- tests/CMakeLists.txt | 2 +- 6 files changed, 15 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4d254b7a..640108cbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,7 +475,7 @@ if(WITH_COVERAGE) if(WITH_COVERAGE AND CMAKE_COMPILER_IS_CLANGXX) set(MAIN_BINARIES "$" - "$" + "$" "$") setup_target_for_coverage_llvm( NAME coverage diff --git a/src/autotype/mac/CMakeLists.txt b/src/autotype/mac/CMakeLists.txt index 08239af96..ae1f5187f 100644 --- a/src/autotype/mac/CMakeLists.txt +++ b/src/autotype/mac/CMakeLists.txt @@ -10,9 +10,8 @@ install(TARGETS keepassxc-autotype-cocoa if(WITH_APP_BUNDLE) add_custom_command(TARGET keepassxc-autotype-cocoa POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - $ - ${CMAKE_BINARY_DIR}/src/$/${PROGNAME}.app/Contents/PlugIns/libkeepassxc-autotype-cocoa.so + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassxc-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}/libkeepassxc-autotype-cocoa.so + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src COMMENT "Copying autotype plugin into app bundle") set_property(GLOBAL APPEND PROPERTY diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index 9e181a064..ecd5da284 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -54,18 +54,18 @@ if (READLINE_FOUND) target_link_libraries(cli ${Readline_LIBRARY}) endif() -add_executable(${PROGNAME}-cli keepassxc-cli.cpp) -target_link_libraries(${PROGNAME}-cli +add_executable(keepassxc-cli keepassxc-cli.cpp) +target_link_libraries(keepassxc-cli ${GPGERROR_LIBRARIES} cli keepassxc_core) -install(TARGETS ${PROGNAME}-cli +install(TARGETS keepassxc-cli BUNDLE DESTINATION . COMPONENT Runtime RUNTIME DESTINATION ${CLI_INSTALL_DIR} COMPONENT Runtime) if(WIN32) - target_sources(${PROGNAME}-cli + target_sources(keepassxc-cli PRIVATE keepassxc-cli.exe.manifest) # install(CODE "include(BundleUtilities) @@ -74,12 +74,13 @@ if(WIN32) endif() if(APPLE AND WITH_APP_BUNDLE) - add_custom_command(TARGET ${PROGNAME}-cli + set(CLI_APP_DIR "${CMAKE_BINARY_DIR}/src/${CLI_INSTALL_DIR}") + + add_custom_command(TARGET keepassxc-cli POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - $ - ${CMAKE_BINARY_DIR}/src/$/${PROGNAME}.app/Contents/MacOS/${PROGNAME}-cli - COMMENT "Copying ${PROGNAME}-cli into app bundle") + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/keepassxc-cli ${CLI_APP_DIR}/keepassxc-cli + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src + COMMENT "Copying keepassxc-cli into app bundle") set_property(GLOBAL APPEND PROPERTY - _MACDEPLOYQT_EXTRA_BINARIES "${CLI_INSTALL_DIR}/${PROGNAME}-cli") + _MACDEPLOYQT_EXTRA_BINARIES "${CLI_INSTALL_DIR}/keepassxc-cli") endif() diff --git a/src/gui/ApplicationSettingsWidget.cpp b/src/gui/ApplicationSettingsWidget.cpp index 18fe4bfb5..adaa2126a 100644 --- a/src/gui/ApplicationSettingsWidget.cpp +++ b/src/gui/ApplicationSettingsWidget.cpp @@ -647,4 +647,3 @@ void ApplicationSettingsWidget::selectBackupDirectory() QDir(backupDirectory).filePath(config()->getDefault(Config::BackupFilePathPattern).toString())); } } - diff --git a/src/thirdparty/zxcvbn/CMakeLists.txt b/src/thirdparty/zxcvbn/CMakeLists.txt index 3487dee23..dcc2a5efd 100644 --- a/src/thirdparty/zxcvbn/CMakeLists.txt +++ b/src/thirdparty/zxcvbn/CMakeLists.txt @@ -6,7 +6,4 @@ endif() if(CC_HAS_Wshadow_local) set_property(SOURCE zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shadow-local") endif() -if(CMAKE_C_COMPILER_ID MATCHES "Clang") - set_property(SOURCE zxcvbn.c APPEND PROPERTY COMPILE_OPTIONS "-Wno-shorten-64-to-32") -endif() target_include_directories(zxcvbn PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2dde799b2..96d098944 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -245,7 +245,7 @@ endif() add_unit_test(NAME testcli SOURCES TestCli.cpp LIBS testsupport cli ${ZXCVBN_LIBRARIES} ${TEST_LIBRARIES}) -target_compile_definitions(testcli PRIVATE KEEPASSX_CLI_PATH="$") +target_compile_definitions(testcli PRIVATE KEEPASSX_CLI_PATH="$") if(WITH_GUI_TESTS) add_subdirectory(gui)