Skip to content

Instantly share code, notes, and snippets.

@mko-x
Created April 7, 2019 10:42
Show Gist options
  • Save mko-x/ca755d6a0a427283f078c4687206dca9 to your computer and use it in GitHub Desktop.
Save mko-x/ca755d6a0a427283f078c4687206dca9 to your computer and use it in GitHub Desktop.
Build KeePassXC for macOS from scratch
#!/bin/bash
# You may consider using sudo.
# According to https://github.com/keepassxreboot/keepassxc/blob/develop/INSTALL.md
# I was finally able to build keepassxc on my Mac.
# ensure brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew install make cmake gcc qt libgcrypt quazip zlib libmicrohttpd libxi \
libxtst qtx11extras libsodium libargon2
git clone https://github.com/keepassxreboot/keepassxc.git
cd keepassxc
mkdir build
cd build
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_CXX_FLAGS="std=c++11 -stdlib=libc++" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="gcc" \
-DCMAKE_CXX_COMPILER="c++" \
-DCMAKE_FIND_ROOT_PATH="/usr/local/Cellar/gcc/8.3.0/bin" \
-DWITH_XC_YUBIKEY=ON \
-DWITH_XC_BROWSER=ON \
-DWITH_XC_NETWORKING=ON \
-DWITH_XC_KEESHARE=ON \
-DWITH_XC_KEESHARE_SECURE=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DKEEPASSXC_VERSION_PATCH="5" \
-DQUAZIP_INCLUDE_DIR="/usr/local/Cellar/quazip/0.7.3_1/include" \
-DQUAZIP_LIBRARIES="/usr/local/Cellar/quazip/0.7.3_1/lib" \
-DOVERRIDE_VERSION=ON \
-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.12.2/lib/cmake/ ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment