GithubHelp home page GithubHelp logo

kdart / qt-meson-example Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 39 KB

Example project for using meson to build MacOS app bundle, with Qt framework.

C++ 15.08% C 10.58% Shell 37.83% Meson 36.51%
qt5 mesonbuild macos

qt-meson-example's Introduction

Qt Application bundle for MacOS using meson+ninja

Example project to build Qt app bundle for MacOS using meson.

This repository contains a simple Qt5 Hello World application for MacOS that is built with Meson and ninja build system.

Dependencies

Homebrew

Building also depends on homebrew. I install everything in /opt.

Qt

I currently install Qt from source, first. I would like to get Qt as part of the build using a subproject, but that's not fully set up yet.

Download: http://mirrors.ocf.berkeley.edu/qt/archive/qt/5.9/5.9.6/single/qt-everywhere-opensource-src-5.9.6.tar.xz

Build like this:

DESIRED_QT=5.9.6
SRC=$PWD

cd ~/build
tar xJf ~/Downloads/qt-everywhere-opensource-src-${DESIRED_QT}.tar.xz
cd qt-everywhere-src-${DESIRED_QT}
./configure -prefix /opt/Qt${DESIRED_QT} -nomake tests -nomake examples -opensource -skip qt3d -c++std c++11
patch -p1 < $SRC/subprojects/qt-everywhere-opensource-src-${DESIRED_QT}.diff
make
sudo make install

Setup

  1. Install the build tools.
   brew install ninja
   brew install meson
  1. Make sure the Qt version's bin directory is on your PATH. For example: /opt/Qt5.9.5/bin (The configure script uses qmake to determine the Qt version)
   export PATH=/opt/Qt5.9.5/bin:$PATH
  1. Run configure. The configure script runs meson for you.
   ./configure

Build and install

  1. cd into build directory.
   cd build
  1. run ninja.
   ninja
  1. run ninja install to install app bundle under install subdirectory.
   ninja install

Run

cd ../install
open hello\_world.app

qt-meson-example's People

Contributors

kdart avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.