aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-14 19:20:07 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-14 19:20:07 +0200
commit7b59ed70050682e3ad38cde24785c3125a03a7a2 (patch)
treef6f33159c6466886ecb23e0098978c0c9f29f2b4
parent3c78c04bb1f50e570a252a7406cc16286829969b (diff)
downloadnuk.lv2-7b59ed70050682e3ad38cde24785c3125a03a7a2.tar.xz
initial migration to meson.
-rw-r--r--.gitlab-ci.yml14
-rw-r--r--CMakeLists.txt134
-rw-r--r--README.md11
-rw-r--r--VERSION2
-rw-r--r--cmake/arm-linux-gnueabihf.cmake20
-rw-r--r--cmake/i686-linux-gnu.cmake7
-rw-r--r--cmake/i686-w64-mingw32.cmake21
-rw-r--r--cmake/universal-apple-darwin.cmake20
-rw-r--r--cmake/x86_64-linux-gnu.cmake4
-rw-r--r--cmake/x86_64-w64-mingw32.cmake21
-rw-r--r--manifest.ttl.in10
-rw-r--r--meson.build113
-rw-r--r--meson/arm-linux-gnueabihf18
-rw-r--r--meson/i686-linux-gnu19
-rw-r--r--meson/i686-w64-mingw3217
-rw-r--r--meson/universal-apple-darwin19
-rw-r--r--meson/x86_64-linux-gnu16
-rw-r--r--meson/x86_64-w64-mingw3217
18 files changed, 236 insertions, 247 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0ae0d1b..a4cf5b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,13 @@
stages:
- build
+ - test
- deploy
.variables_template: &variables_definition
variables:
BASE_NAME: "nuk.lv2"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig:/usr/lib/${CI_BUILD_NAME}/pkgconfig"
- TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake"
+ TOOLCHAIN_FILE: "meson/${CI_BUILD_NAME}"
.common_template: &common_definition
<<: *variables_definition
@@ -19,12 +20,11 @@ stages:
.build_template: &build_definition
<<: *common_definition
script:
- - mkdir build
- - pushd build
- - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR} -DPLUGIN_DEST="${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}/${BASE_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ..
- - cmake .. # needed for darwin
- - make
- - make install
+ - meson --prefix="/opt/${CI_BUILD_NAME}" --libdir="lib" --cross-file "${TOOLCHAIN_FILE}" build
+ - ninja -C build
+ - ninja -C build install
+ - mkdir -p "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/${BASE_NAME}"
+ - cp -r "/opt/${CI_BUILD_NAME}/lib/lv2/${BASE_NAME}/" "${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}/"
.universal_linux_template: &universal_linux_definition
image: ventosus/universal-linux-gnu
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 1f41eae..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(nuk.lv2)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${PROJECT_SOURCE_DIR}/pugl)
-
-set(CMAKE_FIND_FRAMEWORK FIRST)
-
-set(CMAKE_C_FLAGS "-fdata-sections -ffunction-sections ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS "-std=gnu11 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}")
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}")
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}")
-elseif(WIN32)
- set(CMAKE_C_FLAGS "-mstackrealign ${CMAKE_C_FLAGS}")
-endif()
-
-if(CMAKE_BUILD_TYPE STREQUAL "Release")
- if(APPLE)
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-dead_strip ${CMAKE_MODULE_LINKER_FLAGS}")
- else()
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--gc-sections -Wl,-s ${CMAKE_MODULE_LINKER_FLAGS}")
- endif()
-endif()
-
-add_definitions("-D_GNU_SOURCE=1") # asprintf
-
-if(WIN32)
- set(NUK_UI_TYPE "WindowsUI")
-elseif(APPLE)
- set(NUK_UI_TYPE "CocoaUI")
-else()
- set(NUK_UI_TYPE "X11UI")
-endif()
-
-file(STRINGS "VERSION" NUK_VERSION)
-string(REPLACE "." ";" VERSION_LIST ${NUK_VERSION})
-list(GET VERSION_LIST 0 NUK_MAJOR_VERSION)
-list(GET VERSION_LIST 1 NUK_MINOR_VERSION)
-list(GET VERSION_LIST 2 NUK_MICRO_VERSION)
-add_definitions("-DNUK_VERSION=\"${NUK_VERSION}\"")
-
-if(NOT DEFINED PLUGIN_DEST)
- set(PLUGIN_DEST lib/lv2/nuk.lv2)
-endif()
-
-find_package(PkgConfig) # ${PKG_CONFIG_FOUND}
-
-set(LIBS m)
-set(LIBS_UI m)
-set(TAR_UI nuk_ui.c)
-
-pkg_search_module(LV2 REQUIRED lv2>=1.10)
-include_directories(${LV2_INCLUDE_DIRS})
-
-find_package(OpenGL)
-if(${OPENGL_FOUND})
- set(LIBS_UI ${LIBS_UI} ${OPENGL_LIBRARIES})
-else() # try pkg-config
- pkg_search_module(GL REQUIRED gl)
- if(${GL_FOUND})
- set(LIBS_UI ${LIBS_UI} ${GL_LDFLAGS})
- else()
- message(FATAL_ERROR "OpenGL not found")
- endif()
-endif()
-add_definitions("-DPUGL_HAVE_GL")
-
-if(WIN32)
- find_library(GDI32_LIBRARY NAMES gdi32)
- if(GDI32_LIBRARY)
- set(LIBS_UI ${LIBS_UI} ${GDI32_LIBRARY})
- else()
- message(FATAL_ERROR "gdi32 library not found")
- endif()
-
- find_library(USER32_LIBRARY NAMES user32)
- if(USER32_LIBRARY)
- set(LIBS_UI ${LIBS_UI} ${USER32_LIBRARY})
- else()
- message(FATAL_ERROR "user32 library not found")
- endif()
-
- set(TAR_UI ${TAR_UI} pugl/pugl/pugl_win.cpp)
-
-elseif(APPLE)
- find_library(COCOA_LIBRARY NAMES Cocoa)
- if(COCOA_LIBRARY)
- set(LIBS_UI ${LIBS_UI} ${COCOA_LIBRARY})
- else()
- message(FATAL_ERROR "Cocoa framework not found")
- endif()
-
- set(TAR_UI ${TAR_UI} pugl/pugl/pugl_osx.m)
-
-else() # GNU/Linux
- pkg_search_module(X11 REQUIRED x11>=1.6)
- include_directories(${X11_INCLUDE_DIRS})
- set(LIBS_UI ${LIBS_UI} ${X11_LDFLAGS})
-
- pkg_search_module(XEXT REQUIRED xext>=1.3)
- include_directories(${XEXT_INCLUDE_DIRS})
- set(LIBS_UI ${LIBS_UI} ${XEXT_LDFLAGS})
-
- set(TAR_UI ${TAR_UI} pugl/pugl/pugl_x11.c)
-endif()
-
-add_library(nuk MODULE nuk.c)
-target_link_libraries(nuk ${LIBS})
-set_target_properties(nuk PROPERTIES PREFIX "")
-if(NOT WIN32)
-set_target_properties(nuk PROPERTIES LINK_FLAGS "-Wl,-e,lv2_descriptor")
-endif()
-install(TARGETS nuk DESTINATION ${PLUGIN_DEST})
-
-add_library(nuk_ui MODULE ${TAR_UI})
-target_link_libraries(nuk_ui ${LIBS_UI})
-set_target_properties(nuk_ui PROPERTIES PREFIX "")
-if(NOT WIN32)
-set_target_properties(nuk_ui PROPERTIES LINK_FLAGS "-Wl,-e,lv2ui_descriptor")
-endif()
-install(TARGETS nuk_ui DESTINATION ${PLUGIN_DEST})
-
-configure_file(${PROJECT_SOURCE_DIR}/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl)
-install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${PLUGIN_DEST})
-install(FILES ${PROJECT_SOURCE_DIR}/nuk.ttl DESTINATION ${PLUGIN_DEST})
-install(FILES ${PROJECT_SOURCE_DIR}/nuk_ui.ttl DESTINATION ${PLUGIN_DEST})
-
-install(FILES ${PROJECT_SOURCE_DIR}/Abel-Regular.ttf DESTINATION ${PLUGIN_DEST})
-install(FILES ${PROJECT_SOURCE_DIR}/audio.png DESTINATION ${PLUGIN_DEST})
-install(FILES ${PROJECT_SOURCE_DIR}/midi.png DESTINATION ${PLUGIN_DEST})
diff --git a/README.md b/README.md
index 35bfa18..f3b2ee2 100644
--- a/README.md
+++ b/README.md
@@ -10,18 +10,15 @@
### Dependencies
* [LV2](http://lv2plug.in) (LV2 Plugin Standard)
-* [pugl](http://drobilla.net/software/pugl) (Portable API for OpenGL GUIs)
-* [nuklear](https://github.com/vurtun/nuklear) (Immediate-mode GUI)
### Build / install
- git clone https://github.com/OpenMusicKontrollers/nuk.lv2.git
+ git clone https://git.open-music-kontrollers.ch/lv2//nuk.lv2.git
cd nuk.lv2
- mkdir build
+ meson build
cd build
- cmake ..
- make
- sudo make install
+ ninja -j4
+ sudo ninja install
### License
diff --git a/VERSION b/VERSION
index b2fae26..3c3569b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.2889
+0.1.2915
diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake
deleted file mode 100644
index c0ae918..0000000
--- a/cmake/arm-linux-gnueabihf.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_PROCESSOR "armv7h")
-set(TOOLCHAIN "arm-linux-gnueabihf")
-
-# which compilers to use for C and C++
-set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
-set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
-
-# here is the target environment located
-set(CMAKE_FIND_ROOT_PATH "usr/${TOOLCHAIN}")
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-
-set(QEMU qemu-arm)
diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake
deleted file mode 100644
index 7768048..0000000
--- a/cmake/i686-linux-gnu.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_PROCESSOR "i686")
-set(TOOLCHAIN "i686-linux-gnu")
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake
deleted file mode 100644
index 10fe154..0000000
--- a/cmake/i686-w64-mingw32.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Windows)
-set(CMAKE_SYSTEM_PROCESSOR "i686")
-set(TOOLCHAIN "i686-w64-mingw32")
-
-# which compilers to use for C and C++
-set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
-set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
-set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres")
-
-# here is the target environment located
-set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}")
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-
-set(WINE wine32)
diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake
deleted file mode 100644
index 17476af..0000000
--- a/cmake/universal-apple-darwin.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Darwin)
-set(CMAKE_SYSTEM_PROCESSOR "x86_64")
-set(TOOLCHAIN "universal-apple-darwin")
-
-set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
-
-# which compilers to use for C and C++
-set(CMAKE_C_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang")
-set(CMAKE_CXX_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang++")
-
-# here is the target environment located
-set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}/SDK/MacOSX10.11.sdk")
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake
deleted file mode 100644
index 7ab5477..0000000
--- a/cmake/x86_64-linux-gnu.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_PROCESSOR "x86_64")
-set(TOOLCHAIN "x86_64-linux-gnu")
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
deleted file mode 100644
index 1e61d82..0000000
--- a/cmake/x86_64-w64-mingw32.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# the name of the target operating system
-set(CMAKE_SYSTEM_NAME Windows)
-set(CMAKE_SYSTEM_PROCESSOR "x86_64")
-set(TOOLCHAIN "x86_64-w64-mingw32")
-
-# which compilers to use for C and C++
-set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
-set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
-set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres")
-
-# here is the target environment located
-set(CMAKE_FIND_ROOT_PATH "/usr/${TOOLCHAIN}")
-
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-
-set(WINE wine64)
diff --git a/manifest.ttl.in b/manifest.ttl.in
index b9438e8..4f50e95 100644
--- a/manifest.ttl.in
+++ b/manifest.ttl.in
@@ -22,13 +22,13 @@
nuk:nuk
a lv2:Plugin ;
- lv2:minorVersion @NUK_MINOR_VERSION@ ;
- lv2:microVersion @NUK_MICRO_VERSION@ ;
- lv2:binary <nuk@CMAKE_SHARED_MODULE_SUFFIX@> ;
+ lv2:minorVersion @MINOR_VERSION@ ;
+ lv2:microVersion @MICRO_VERSION@ ;
+ lv2:binary <nuk@MODULE_SUFFIX@> ;
ui:ui nuk:nuk_ui ;
rdfs:seeAlso <nuk.ttl> .
nuk:nuk_ui
- a ui:@NUK_UI_TYPE@ ;
- ui:binary <nuk_ui@CMAKE_SHARED_MODULE_SUFFIX@> ;
+ a ui:@UI_TYPE@ ;
+ ui:binary <nuk_ui@MODULE_SUFFIX@> ;
rdfs:seeAlso <nuk_ui.ttl> .
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..d7b1ae6
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,113 @@
+project('nuk.lv2', 'c', default_options : [
+ 'buildtype=release',
+ 'warning_level=1',
+ 'werror=false',
+ 'b_lto=false',
+ 'c_std=c11'])
+
+cc = meson.get_compiler('c')
+
+m_dep = cc.find_library('m')
+lv2_dep = dependency('lv2', version : '>=1.14.0')
+sratom_dep = dependency('sratom-0', version : '>=0.6.0',
+ static : meson.is_cross_build())
+
+dsp_deps = [m_dep, lv2_dep]
+ui_deps = [m_dep, lv2_dep, sratom_dep]
+
+pugl_inc = include_directories('pugl')
+inc_dir = [pugl_inc]
+
+inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
+
+rawvers = run_command('cat', 'VERSION').stdout().strip()
+version = rawvers.split('.')
+
+conf_data = configuration_data()
+conf_data.set('MAJOR_VERSION', version[0])
+conf_data.set('MINOR_VERSION', version[1])
+conf_data.set('MICRO_VERSION', version[2])
+
+add_project_arguments('-DNUK_VERSION="'+rawvers+'"', language : 'c')
+add_project_arguments('-D_GNU_SOURCE', language : 'c')
+add_project_arguments('-DPUGL_HAVE_GL', language : 'c')
+
+cp = find_program('cp')
+clone = [cp, '@INPUT@', '@OUTPUT@']
+
+c_args = ['-fvisibility=hidden',
+ '-ffast-math',
+ '-Wno-unused-variable',
+ '-Wno-unused-function',
+ '-Wno-misleading-indentation']
+
+dsp_srcs = ['nuk.c']
+
+ui_srcs = ['nuk_ui.c']
+
+if host_machine.system() == 'linux'
+ conf_data.set('UI_TYPE', 'X11UI')
+ ui_deps += dependency('gl')
+ ui_deps += dependency('x11', version : '>=1.6.0')
+ ui_deps += dependency('xext', version : '>=1.3.0')
+ ui_srcs += 'pugl/pugl/pugl_x11.c'
+elif host_machine.system() == 'windows'
+ add_languages('cpp')
+ conf_data.set('UI_TYPE', 'WindowsUI')
+ ui_deps += cc.find_library('opengl32')
+ ui_deps += cc.find_library('gdi32')
+ ui_deps += cc.find_library('user32')
+ ui_srcs += 'pugl/pugl/pugl_win.cpp'
+elif host_machine.system() == 'darwin'
+ #add_languages('objc')
+ conf_data.set('UI_TYPE', 'CocoaUI')
+ #ui_deps += cc.find_library('Cocoa')
+ #ui_deps += cc.find_library('gl')
+ #ui_deps += dependency('appleframeworks', modules : 'cocoa')
+ #ui_srcs += 'pugl/pugl/pugl_osx.m'
+endif
+
+mod = shared_module('nuk', dsp_srcs,
+ c_args : c_args,
+ include_directories : inc_dir,
+ name_prefix : '',
+ dependencies : dsp_deps,
+ install : true,
+ install_dir : inst_dir)
+
+ui = shared_module('nuk_ui', ui_srcs,
+ c_args : c_args,
+ include_directories : inc_dir,
+ name_prefix : '',
+ dependencies : ui_deps,
+ install : true,
+ install_dir : inst_dir)
+
+suffix = mod.full_path().strip().split('.')[-1]
+conf_data.set('MODULE_SUFFIX', '.' + suffix)
+
+configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl',
+ configuration : conf_data,
+ install : true,
+ install_dir : inst_dir)
+
+custom_target('dsp_ttl',
+ input : 'nuk.ttl',
+ output : 'nuk.ttl',
+ command : clone,
+ install : true,
+ install_dir : inst_dir)
+
+custom_target('ui_ttl',
+ input : 'nuk_ui.ttl',
+ output : 'nuk_ui.ttl',
+ command : clone,
+ install : true,
+ install_dir : inst_dir)
+
+custom_target('font',
+ input : 'Abel-Regular.ttf',
+ output : 'Abel-Regular.ttf',
+ command : clone,
+ install : true,
+ install_dir : inst_dir)
diff --git a/meson/arm-linux-gnueabihf b/meson/arm-linux-gnueabihf
new file mode 100644
index 0000000..241266e
--- /dev/null
+++ b/meson/arm-linux-gnueabihf
@@ -0,0 +1,18 @@
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'armv7hl'
+endian = 'little'
+
+[binaries]
+c = '/usr/bin/arm-linux-gnueabihf-gcc'
+cpp = '/usr/bin/arm-linux-gnueabihf-g++'
+ar = '/usr/bin/arm-linux-gnueabihf-ar'
+strip = '/usr/bin/arm-linux-gnueabihf-strip'
+pkgconfig = '/usr/bin/pkg-config'
+exe_wrapper = '/usr/bin/qemu-arm'
+
+[properties]
+root = '/usr/arm-linux-gnueabihf'
+c_link_args = ['-Wl,-z,defs']
+needs_exe_wrapper = true
diff --git a/meson/i686-linux-gnu b/meson/i686-linux-gnu
new file mode 100644
index 0000000..17d5a41
--- /dev/null
+++ b/meson/i686-linux-gnu
@@ -0,0 +1,19 @@
+[host_machine]
+system = 'linux'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
+
+[binaries]
+c = '/usr/bin/x86_64-linux-gnu-gcc'
+cpp = '/usr/bin/x86_64-linux-gnu-g++'
+ar = '/usr/bin/x86_64-linux-gnu-ar'
+strip = '/usr/bin/x86_64-linux-gnu-strip'
+pkgconfig = '/usr/bin/pkg-config'
+
+[properties]
+c_args = ['-m32']
+cpp_args = ['-m32']
+c_link_args = ['-m32', '-Wl,-z,defs']
+cpp_link_args = ['-m32', '-Wl,-z,defs']
+needs_exe_wrapper = false
diff --git a/meson/i686-w64-mingw32 b/meson/i686-w64-mingw32
new file mode 100644
index 0000000..4966ba7
--- /dev/null
+++ b/meson/i686-w64-mingw32
@@ -0,0 +1,17 @@
+[host_machine]
+system = 'windows'
+cpu_family = 'i686'
+cpu = 'i686'
+endian = 'little'
+
+[binaries]
+c = '/usr/bin/i686-w64-mingw32-gcc'
+cpp = '/usr/bin/i686-w64-mingw32-g++'
+ar = '/usr/bin/i686-w64-mingw32-ar'
+strip = '/usr/bin/i686-w64-mingw32-strip'
+pkgconfig = '/usr/bin/pkg-config'
+exe_wrapper = '/usr/bin/wine'
+
+[properties]
+root = '/usr/i686-w64-mingw32'
+needs_exe_wrapper = true
diff --git a/meson/universal-apple-darwin b/meson/universal-apple-darwin
new file mode 100644
index 0000000..0ee2e02
--- /dev/null
+++ b/meson/universal-apple-darwin
@@ -0,0 +1,19 @@
+[host_machine]
+system = 'darwin'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
+
+[binaries]
+c = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang'
+cpp = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang++'
+objc = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-clang'
+ar = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-ar'
+strip = '/usr/universal-apple-darwin/bin/x86_64-apple-darwin15-strip'
+pkgconfig = '/usr/bin/pkg-config'
+
+[properties]
+root = '/usr/universal-apple-darwin/SDK/MacOSX10.11.sdk'
+c_args = ['-arch', 'i386', '-arch', 'x86_64']
+c_link_args = ['-arch', 'i386', '-arch', 'x86_64']
+needs_exe_wrapper = true
diff --git a/meson/x86_64-linux-gnu b/meson/x86_64-linux-gnu
new file mode 100644
index 0000000..b09321c
--- /dev/null
+++ b/meson/x86_64-linux-gnu
@@ -0,0 +1,16 @@
+[host_machine]
+system = 'linux'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
+
+[binaries]
+c = '/usr/bin/x86_64-linux-gnu-gcc'
+cpp = '/usr/bin/x86_64-linux-gnu-g++'
+ar = '/usr/bin/x86_64-linux-gnu-ar'
+strip = '/usr/bin/x86_64-linux-gnu-strip'
+pkgconfig = '/usr/bin/pkg-config'
+
+[properties]
+c_link_args = ['-Wl,-z,defs']
+needs_exe_wrapper = false
diff --git a/meson/x86_64-w64-mingw32 b/meson/x86_64-w64-mingw32
new file mode 100644
index 0000000..40c8a32
--- /dev/null
+++ b/meson/x86_64-w64-mingw32
@@ -0,0 +1,17 @@
+[host_machine]
+system = 'windows'
+cpu_family = 'x86_64'
+cpu = 'x86_64'
+endian = 'little'
+
+[binaries]
+c = '/usr/bin/x86_64-w64-mingw32-gcc'
+cpp = '/usr/bin/x86_64-w64-mingw32-g++'
+ar = '/usr/bin/x86_64-w64-mingw32-ar'
+strip = '/usr/bin/x86_64-w64-mingw32-strip'
+pkgconfig = '/usr/bin/pkg-config'
+exe_wrapper = '/usr/bin/wine64'
+
+[properties]
+root = '/usr/x86_64-w64-mingw32'
+needs_exe_wrapper = true