aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-03-30 17:14:29 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-03-30 23:16:56 +0200
commit0a12db5299ba7e47f69626de655b09ebccfb15a7 (patch)
treef009e5c9bccc43190913020dc2c053a5a2b01056
parent0fc71f68410dfd0ea46b3c5fe5f4de0f62911cb2 (diff)
downloadlv2lint-0a12db5299ba7e47f69626de655b09ebccfb15a7.zip
lv2lint-0a12db5299ba7e47f69626de655b09ebccfb15a7.tar.gz
lv2lint-0a12db5299ba7e47f69626de655b09ebccfb15a7.tar.bz2
lv2lint-0a12db5299ba7e47f69626de655b09ebccfb15a7.tar.xz
Initial migration to meson.
-rw-r--r--.gitlab-ci.yml11
-rw-r--r--CMakeLists.txt97
-rw-r--r--README.md11
-rw-r--r--VERSION2
-rw-r--r--cmake/arm-linux-gnueabihf.cmake24
-rw-r--r--cmake/i686-linux-gnu.cmake13
-rw-r--r--cmake/i686-w64-mingw32.cmake27
-rw-r--r--cmake/universal-apple-darwin.cmake25
-rw-r--r--cmake/x86_64-linux-gnu.cmake10
-rw-r--r--cmake/x86_64-w64-mingw32.cmake27
-rw-r--r--meson.build47
-rw-r--r--meson/arm-linux-gnueabihf16
-rw-r--r--meson/i686-linux-gnu17
-rw-r--r--meson/i686-w64-mingw3216
-rw-r--r--meson/universal-apple-darwin16
-rw-r--r--meson/x86_64-linux-gnu15
-rw-r--r--meson/x86_64-w64-mingw3216
-rw-r--r--meson_options.txt2
18 files changed, 155 insertions, 237 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 285217a..6c87c35 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ stages:
variables:
BASE_NAME: "lv2lint"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig"
- TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake"
+ TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/meson/${CI_BUILD_NAME}"
.common_template: &common_definition
<<: *variables_definition
@@ -19,12 +19,9 @@ stages:
.build_template: &build_definition
<<: *common_definition
script:
- - mkdir build
- - pushd build
- - cmake -DENABLE_ONLINE_TESTS=OFF -DENABLE_ELF_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${CI_PROJECT_DIR}/${BASE_NAME}-$(cat ../VERSION)/${CI_BUILD_NAME}" -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} ..
- - cmake .. # needed for darwin
- - make
- - make install
+ - meson --prefix=/ --cross-file "${TOOLCHAIN_FILE}" -Dstatic-build=false build
+ - ninja -C build
+ - DESTDIR="${CI_PROJECT_DIR}/${BASE_NAME}-$(cat VERSION)/${CI_BUILD_NAME}" ninja -C build install
.universal_linux_template: &universal_linux_definition
image: ventosus/universal-linux-gnu
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 1e2d7bf..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,97 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(lv2lint.lv2)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${PROJECT_BINARY_DIR})
-
-set(CMAKE_C_FLAGS "-std=gnu11 -Wpedantic -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}")
-add_definitions("-D_GNU_SOURCE=1") # asprintf
-
-file(STRINGS "VERSION" LV2LINT_VERSION)
-string(REPLACE "." ";" VERSION_LIST ${LV2LINT_VERSION})
-list(GET VERSION_LIST 0 LV2LINT_MAJOR_VERSION)
-list(GET VERSION_LIST 1 LV2LINT_MINOR_VERSION)
-list(GET VERSION_LIST 2 LV2LINT_MICRO_VERSION)
-add_definitions("-DLV2LINT_VERSION=\"${LV2LINT_VERSION}\"")
-
-find_package(PkgConfig) # ${PKG_CONFIG_FOUND}
-include(FindUnixCommands)
-
-set(LIBS m)
-
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- set(LIBS ${LIBS} dl)
-endif()
-
-pkg_search_module(LV2 REQUIRED lv2>=1.10)
-include_directories(${LV2_INCLUDE_DIRS})
-set(LIBS ${LIBS} ${LV2_LDFLAGS})
-
-pkg_search_module(LILV REQUIRED lilv-0>=0.20.0)
-include_directories(${LILV_INCLUDE_DIRS})
-if(DEFINED STATIC_LILV)
- set(LIBS ${STATIC_LILV} ${STATIC_SRATOM} ${STATIC_SORD} ${STATIC_SERD} ${LIBS})
-else()
- set(LIBS ${LIBS} ${LILV_LDFLAGS})
-endif()
-if((${LILV_VERSION} VERSION_EQUAL "0.22.0") OR (${LILV_VERSION} VERSION_GREATER "0.22.0"))
- add_definitions("-DLILV_0_22")
-endif()
-
-option(ENABLE_ONLINE_TESTS "Enable online tests (e.g. tool will try to connect to the internet)" ON)
-if(ENABLE_ONLINE_TESTS)
- add_definitions("-DENABLE_ONLINE_TESTS")
-
- pkg_search_module(CURL REQUIRED libcurl>=7.0.0)
- include_directories(${CURL_INCLUDE_DIRS})
- set(LIBS ${LIBS} ${CURL_LDFLAGS})
-
- set(MAN "")
-else()
- set(MAN "./")
-endif()
-
-if(NOT (WIN32 OR APPLE))
- option(ENABLE_ELF_TESTS "Enable ELF tests (e.g. tool will check for symbol visibility)" ON)
- if(ENABLE_ELF_TESTS)
- add_definitions("-DENABLE_ELF_TESTS")
-
- pkg_search_module(ELF REQUIRED libelf>=0.170)
- include_directories(${ELF_INCLUDE_DIRS})
- set(LIBS ${LIBS} ${ELF_LDFLAGS})
- endif()
-endif()
-
-add_executable(lv2lint
- lv2lint.c
- lv2lint_plugin.c
- lv2lint_port.c
- lv2lint_parameter.c
- lv2lint_ui.c)
-set_target_properties(lv2lint PROPERTIES INTERPROCEDURAL_OPTIMIZATION true) # -flto
-target_link_libraries(lv2lint ${LIBS})
-install(TARGETS lv2lint DESTINATION bin)
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lv2lint.1.in ${PROJECT_BINARY_DIR}/lv2lint.1)
-
-add_custom_command(
- OUTPUT ${PROJECT_BINARY_DIR}/lv2lint.1.gz
- COMMAND ${GZIP} ARGS
- "-c9" ${CMAKE_BINARY_DIR}/lv2lint.1
- ">" ${PROJECT_BINARY_DIR}/lv2lint.1.gz
- DEPENDS
- ${CMAKE_BINARY_DIR}/lv2lint.1)
-add_custom_target(LV2LINT_MAN_GZ ALL DEPENDS ${PROJECT_BINARY_DIR}/lv2lint.1.gz)
-install(FILES "${PROJECT_BINARY_DIR}/lv2lint.1.gz" DESTINATION share/man/man1)
-
-include(CTest)
-
-if(${BUILD_TESTING})
- if(NOT WIN32)
- add_test(NAME LV2-Lint COMMAND lv2lint "http://open-music-kontrollers.ch/lv2/moony#a1xa1")
- else()
- add_test(NAME LV2-Lint COMMAND ${WINE} lv2lint "http://open-music-kontrollers.ch/lv2/moony#a1xa1")
- endif()
-endif()
diff --git a/README.md b/README.md
index 0a270a5..3f81e48 100644
--- a/README.md
+++ b/README.md
@@ -19,17 +19,16 @@
### Build / install
- git clone https://gitlab.com/OpenMusicKontrollers/lv2lint.git
+ git clone https://git.open-music-kontrollers.ch/lv2/lv2lint
cd lv2lint
- mkdir build
+ meson -Donline-tests=true -Delf-tests=true build
cd build
- cmake -DCMAKE_BUILD_TYPE="Release" ..
- make
- sudo make install
+ ninja
+ sudo ninja install
### Usage
- lv2lint -Swarn -Snote http://lv2plug.in/plugins/eg-scope#Stereo
+ lv2lint -d -o -Swarn -Snote http://lv2plug.in/plugins/eg-scope#Stereo
### License
diff --git a/VERSION b/VERSION
index 2d33723..0e7f90a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.237
+0.1.241
diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake
deleted file mode 100644
index 91d486f..0000000
--- a/cmake/arm-linux-gnueabihf.cmake
+++ /dev/null
@@ -1,24 +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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
-set(LIBS ${LIBS} "-ldl")
diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake
deleted file mode 100644
index 7fc35ae..0000000
--- a/cmake/i686-linux-gnu.cmake
+++ /dev/null
@@ -1,13 +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")
-
-set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
-set(LIBS ${LIBS} "-ldl")
diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake
deleted file mode 100644
index 384811a..0000000
--- a/cmake/i686-w64-mingw32.cmake
+++ /dev/null
@@ -1,27 +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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
-set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv")
-
-set(WINE wine32)
diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake
deleted file mode 100644
index 0546c98..0000000
--- a/cmake/universal-apple-darwin.cmake
+++ /dev/null
@@ -1,25 +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}")
-
-# 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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake
deleted file mode 100644
index e0487b9..0000000
--- a/cmake/x86_64-linux-gnu.cmake
+++ /dev/null
@@ -1,10 +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")
-
-set(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
-set(LIBS ${LIBS} "-ldl")
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
deleted file mode 100644
index a569cd0..0000000
--- a/cmake/x86_64-w64-mingw32.cmake
+++ /dev/null
@@ -1,27 +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(STATIC_LILV "/opt/${TOOLCHAIN}/lib/liblilv-0.a")
-set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
-set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
-set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")
-set(LIBS ${LIBS} "-static-libgcc -Wl,-Bstatic -luserenv")
-
-set(WINE wine64)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..cc707cb
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,47 @@
+project('lv2lint', 'c', default_options : [
+ 'buildtype=release',
+ 'warning_level=1',
+ 'b_lto=true',
+ 'c_std=c11'])
+
+online_tests = get_option('online-tests')
+elf_tests = get_option('elf-tests')
+
+version = run_command('cat', 'VERSION').stdout().strip()
+
+add_project_arguments('-DLV2LINT_VERSION="'+version+'"', language : 'c')
+add_project_arguments('-D_GNU_SOURCE', language : 'c')
+
+conf_data = configuration_data()
+cc = meson.get_compiler('c')
+
+m_dep = cc.find_library('m')
+lv2_dep = dependency('lv2', version : '>=1.14.0')
+lilv_dep = dependency('lilv-0', version : '>=0.24.0')
+curl_dep = dependency('libcurl', required: false)
+elf_dep = dependency('libelf', required: false)
+
+if curl_dep.found() and online_tests
+ add_project_arguments('-DENABLE_ONLINE_TESTS', language : 'c')
+ conf_data.set('MAN', '')
+else
+ conf_data.set('MAN', './')
+endif
+
+if elf_dep.found() and elf_tests
+ add_project_arguments('-DENABLE_ELF_TESTS', language : 'c')
+endif
+
+executable('lv2lint',
+ 'lv2lint.c',
+ 'lv2lint_plugin.c',
+ 'lv2lint_port.c',
+ 'lv2lint_parameter.c',
+ 'lv2lint_ui.c',
+ dependencies : [m_dep, lv2_dep, lilv_dep, curl_dep, elf_dep],
+ install : true)
+
+configure_file(input : 'lv2lint.1.in', output : 'lv2lint.1',
+ configuration : conf_data)
+
+install_man(meson.current_build_dir()+'/lv2lint.1')
diff --git a/meson/arm-linux-gnueabihf b/meson/arm-linux-gnueabihf
new file mode 100644
index 0000000..cb87ad9
--- /dev/null
+++ b/meson/arm-linux-gnueabihf
@@ -0,0 +1,16 @@
+[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-cpp'
+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]
+needs_exe_wrapper = true
diff --git a/meson/i686-linux-gnu b/meson/i686-linux-gnu
new file mode 100644
index 0000000..35ea0c9
--- /dev/null
+++ b/meson/i686-linux-gnu
@@ -0,0 +1,17 @@
+[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-cpp'
+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']
+c_link_args = ['-m32']
+needs_exe_wrapper = false
diff --git a/meson/i686-w64-mingw32 b/meson/i686-w64-mingw32
new file mode 100644
index 0000000..a1fda3f
--- /dev/null
+++ b/meson/i686-w64-mingw32
@@ -0,0 +1,16 @@
+[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-cpp'
+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]
+needs_exe_wrapper = true
diff --git a/meson/universal-apple-darwin b/meson/universal-apple-darwin
new file mode 100644
index 0000000..8dadf28
--- /dev/null
+++ b/meson/universal-apple-darwin
@@ -0,0 +1,16 @@
+[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'
+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]
+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..0225bb9
--- /dev/null
+++ b/meson/x86_64-linux-gnu
@@ -0,0 +1,15 @@
+[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-cpp'
+ar = '/usr/bin/x86_64-linux-gnu-ar'
+strip = '/usr/bin/x86_64-linux-gnu-strip'
+pkgconfig = '/usr/bin/pkg-config'
+
+[properties]
+needs_exe_wrapper = false
diff --git a/meson/x86_64-w64-mingw32 b/meson/x86_64-w64-mingw32
new file mode 100644
index 0000000..4094990
--- /dev/null
+++ b/meson/x86_64-w64-mingw32
@@ -0,0 +1,16 @@
+[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-cpp'
+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]
+needs_exe_wrapper = true
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..0bcf182
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('online-tests', type : 'boolean', value : false)
+option('elf-tests', type : 'boolean', value : false)