diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index 4c52e6b7..e59a911a 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -83,6 +83,13 @@ if(APPLE AND WITH_APP_BUNDLE) "@executable_path/../Frameworks/libykpers-1.1.dylib" keepassxc-cli COMMENT "Changing linking of keepassxc-cli") + + # Copy app to staging directory for pre-install testing + set(CLI_APP_DIR "${CMAKE_BINARY_DIR}/src/${CLI_INSTALL_DIR}") + add_custom_command(TARGET keepassxc-cli + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy keepassxc-cli ${CLI_APP_DIR}/keepassxc-cli + COMMENT "Copying keepassxc-cli inside the application") endif() if(APPLE OR UNIX) diff --git a/src/proxy/CMakeLists.txt b/src/proxy/CMakeLists.txt index 6839c9a2..ff645dad 100755 --- a/src/proxy/CMakeLists.txt +++ b/src/proxy/CMakeLists.txt @@ -45,6 +45,13 @@ if(WITH_XC_BROWSER) "@executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork" keepassxc-proxy COMMENT "Changing linking of keepassxc-proxy") + + # Copy app to staging directory for pre-install testing + set(PROXY_APP_DIR "${CMAKE_BINARY_DIR}/src/${PROXY_INSTALL_DIR}") + add_custom_command(TARGET keepassxc-proxy + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy keepassxc-proxy ${PROXY_APP_DIR}/keepassxc-proxy + COMMENT "Copying keepassxc-proxy inside the application") endif() if(MINGW) target_link_libraries(keepassxc-proxy Wtsapi32.lib Ws2_32.lib)