Skip to content

Instantly share code, notes, and snippets.

@epegzz
Forked from marksteve/pgmodeler-brew.md
Created April 21, 2021 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epegzz/6d47176562b0c0ab6b472ba1dcfe11fe to your computer and use it in GitHub Desktop.
Save epegzz/6d47176562b0c0ab6b472ba1dcfe11fe to your computer and use it in GitHub Desktop.

Building pgModeler in MacOS with Homebrew

The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!

  1. Checkout the source

    git clone https://github.com/pgmodeler/pgmodeler.git
    git checkout master
    
  2. Install dependencies with brew

    brew install qt libxml2 libpq
    
  3. Tweak build script (pgmodeler.pri)

    macx {
      PGSQL_LIB = /usr/local/opt/libpq/lib/libpq.dylib
      PGSQL_INC = /usr/local/opt/libpq/include
      XML_INC = /usr/local/opt/libxml2/include/libxml2
      XML_LIB = /usr/local/opt/libxml2/lib/libxml2.dylib
      INCLUDEPATH += $$PGSQL_INC $$XML_INC
    }
    
  4. Build

    qmake -r pgmodeler.pro
    make
    make install
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment