All Projects → lachs0r → Mingw W64 Cmake

lachs0r / Mingw W64 Cmake

Licence: isc
CMake-based MinGW-w64 Cross Toolchain

Labels

Projects that are alternatives of or similar to Mingw W64 Cmake

Magnum Bootstrap
Bootstrap projects for Magnum C++11/C++14 graphics engine
Stars: ✭ 69 (-17.86%)
Mutual labels:  cmake
Cmake.vim
🔨 CMake functionality within Vim.
Stars: ✭ 76 (-9.52%)
Mutual labels:  cmake
Gr Elster
A GNU Radio block that decodes packets transmitted by Elster R2S smart meters
Stars: ✭ 78 (-7.14%)
Mutual labels:  cmake
Hacktoberfest2020
Contribute for hacktoberfest 2020
Stars: ✭ 72 (-14.29%)
Mutual labels:  cmake
Cmake Modules
CMake modules for some scientific libraries
Stars: ✭ 75 (-10.71%)
Mutual labels:  cmake
Findtbb
CMake find module for Intel Threading Building Blocks
Stars: ✭ 77 (-8.33%)
Mutual labels:  cmake
Tristeon3d
A 3D Engine built by two Game Engineering students.
Stars: ✭ 68 (-19.05%)
Mutual labels:  cmake
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-1.19%)
Mutual labels:  cmake
Openssl Cmake
Build OpenSSL with CMake on MacOS, Win32, Win64 and cross compile for Android, IOS
Stars: ✭ 76 (-9.52%)
Mutual labels:  cmake
Leathers
🚀 Warning suppression library (C++)
Stars: ✭ 78 (-7.14%)
Mutual labels:  cmake
Burst
То, чего нет в Бусте
Stars: ✭ 72 (-14.29%)
Mutual labels:  cmake
Fcnpc
FCNPC - Fully Controllable NPC
Stars: ✭ 73 (-13.1%)
Mutual labels:  cmake
Cotire
CMake module to speed up builds.
Stars: ✭ 1,212 (+1342.86%)
Mutual labels:  cmake
Ncnn Benchmark
The benchmark of ncnn that is a high-performance neural network inference framework optimized for the mobile platform
Stars: ✭ 70 (-16.67%)
Mutual labels:  cmake
Llvm Amdgpu Assembler Extra
LLVM AMDGPU Assembler Helper Tools
Stars: ✭ 80 (-4.76%)
Mutual labels:  cmake
Didi challenge ros
Roslaunch to visualize a rosbag file from Udacity (DiDi Challenge)
Stars: ✭ 69 (-17.86%)
Mutual labels:  cmake
Helloworld
A C++ Hello World project, using CMake, and GitHub Actions
Stars: ✭ 77 (-8.33%)
Mutual labels:  cmake
Gr Nordic
GNU Radio module and Wireshark dissector for the Nordic Semiconductor nRF24L Enhanced Shockburst protocol.
Stars: ✭ 84 (+0%)
Mutual labels:  cmake
Progress Cpp
A flexible ASCII progress-bar for C++
Stars: ✭ 81 (-3.57%)
Mutual labels:  cmake
Hpp Skel
Skeleton for C++ header-only libraries
Stars: ✭ 78 (-7.14%)
Mutual labels:  cmake

CMake-based MinGW-w64 Cross Toolchain

.. warning:: This is project is no longer maintained. I now run a custom OBS instance at https://obs.cirno.systems instead.

This thing’s primary use is to build Windows binaries of mpv.

Prerequisites

In addition to CMake, you need the usual development stuff (Git, Subversion, GCC, Binutils, ragel, headers for GMP, MPFR and MPC).

.. note:: You should also install Ninja and use CMake’s Ninja build file generator. It’s not only much faster than GNU Make, but also far less error-prone, which is important for this project because CMake’s ExternalProject module tends to generate makefiles which confuse GNU Make’s jobserver thingy.

.. note:: As a build environment, any modern Linux distribution should work, however I am only testing this on openSUSE, which (as of November 2014) is using a 4.8 series GCC by default. Feel free to contribute fixes for other environments.

.. note:: You can use the following on ubuntu (and probably debian) if you dont want to work out the packages yourself::

   apt install git gcc g++ ragel make ninja-build gyp mercurial nasm autotools-dev autoconf automake libgmp-dev libmpfr-dev libmpc-dev

Building Software

To set up the build environment, create a directory to store build files in::

mkdir build-64
cd build-64

Once you’ve changed into that directory, run CMake, e.g.::

cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DCMAKE_INSTALL_PREFIX=prefix -G Ninja ..

Once that’s done, you’re ready to build stuff. For example, to build mpv and all of its dependencies::

ninja mpv

This will take a while (about 20 minutes on my machine).

.. note:: The mpv package has some additional steps to generate files ready for distribution instead of installing it to the prefix.

.. note:: If you wish to disable automatic updates of packages pulled from development sources, use -DENABLE_VCS_UPDATES=false on the CMake command line.

Unpackaged Stuff


Using the toolchain to build stuff which doesn’t have a package is usually
very easy. There are two generated files in your build directory to help with
this: “exec” and “toolchain.cmake”.

For most software (i.e. almost everything that uses GNU Autotools), you can
use “exec” with the configure command:

    ~/mingw/build-64/exec ./configure --prefix=~/mingw/prefix-64/mingw --host=x86_64-w64-mingw32

An alternative is to run “source ~/mingw/build-64/exec” to set all the required
environment variables in your current session.

For software that uses CMake, you can use “toolchain.cmake” like this:

    cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw/build-64/toolchain.cmake -DCMAKE_INSTALL_PREFIX=~/mingw/prefix-64/mingw

In general, it is advisable to use static linking when building for Windows.
To do that, use --disable-shared and/or --enable-static with Autotools-based
configure scripts.

CMake doesn’t have a standard way to achieve this, so you’re on your own.

.. note::
    It’s usually easy to make CMake projects link statically if they don’t have
    an option for it already. If you need an example, look at the patches for
    ``game-music-emu``.


Creating Packages

To add a new package, create a new .cmake file in the packages directory (just look at how the existing packages work) and add it to the list in packages/CMakeLists.txt (they must appear after their dependencies).

See the CMake documentation on the ExternalProject module for further info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].