Commit 68c48e63 authored by Hanspeter Portner's avatar Hanspeter Portner

Squashed 'props.lv2/' changes from a92741c..85a84d3

85a84d3 initial migration to meson.

git-subtree-dir: props.lv2
git-subtree-split: 85a84d32905c309adc8b3f01c152c6f30c64fe52
parent fc8c6643
stages:
- build
- test
- deploy
.variables_template: &variables_definition
variables:
BASE_NAME: "props.lv2"
PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig"
TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/cmake/${CI_BUILD_NAME}.cmake"
.common_template: &common_definition
<<: *variables_definition
stage: build
artifacts:
name: "${BASE_NAME}-$(cat VERSION)-${CI_BUILD_NAME}"
paths:
- "${BASE_NAME}-$(cat VERSION)/"
.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
.universal_linux_template: &universal_linux_definition
image: ventosus/universal-linux-gnu
<<: *build_definition
.arm_linux_template: &arm_linux_definition
image: ventosus/arm-linux-gnueabihf
<<: *build_definition
.universal_w64_template: &universal_w64_definition
image: ventosus/universal-w64-mingw32
<<: *build_definition
.universal_apple_template: &universal_apple_definition
image: ventosus/universal-apple-darwin
<<: *build_definition
# building in docker
x86_64-linux-gnu:
<<: *universal_linux_definition
i686-linux-gnu:
<<: *universal_linux_definition
arm-linux-gnueabihf:
<<: *arm_linux_definition
x86_64-w64-mingw32:
<<: *universal_w64_definition
i686-w64-mingw32:
<<: *universal_w64_definition
universal-apple-darwin:
<<: *universal_apple_definition
pack:
<<: *variables_definition
stage: deploy
script:
- echo 'packing up...'
artifacts:
name: "${BASE_NAME}-$(cat VERSION)"
paths:
- "${BASE_NAME}-$(cat VERSION)/"
cmake_minimum_required(VERSION 2.8)
project(props.lv2)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR})
set(CMAKE_C_FLAGS "-std=gnu99 -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}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}")
add_definitions("-D_GNU_SOURCE=1") # asprintf
set(PROPS_MAJOR_VERSION 0)
set(PROPS_MINOR_VERSION 1)
set(PROPS_MICRO_VERSION 1)
set(PROPS_VERSION "${PROPS_MAJOR_VERSION}.${PROPS_MINOR_VERSION}.${PROPS_MICRO_VERSION}")
add_definitions("-DPROPS_VERSION=\"${PROPS_VERSION}\"")
set(DEST lib/lv2/props.lv2)
if(WIN32)
set(LIB_EXT ".dll")
elseif(APPLE)
set(LIB_EXT ".so")
else()
set(LIB_EXT ".so")
endif()
find_package(PkgConfig) # ${PKG_CONFIG_FOUND}
# props
add_library(props MODULE
test/props.c)
target_link_libraries(props ${LIBS})
set_target_properties(props PROPERTIES PREFIX "")
install(TARGETS props DESTINATION ${DEST})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/props.ttl DESTINATION ${DEST})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/test/chunk.bin DESTINATION ${DEST})
# manifest
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl)
install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${DEST})
project('props.lv2', 'c', default_options : [
'buildtype=release',
'warning_level=1',
'werror=false',
'b_lto=true',
'c_std=c11'])
add_project_arguments('-D_GNU_SOURCE', language : 'c')
conf_data = configuration_data()
cc = meson.get_compiler('c')
cp = find_program('cp')
clone = [cp, '@INPUT@', '@OUTPUT@']
m_dep = cc.find_library('m')
lv2_dep = dependency('lv2', version : '>=1.14.0')
inc_dir = []
inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
dsp_srcs = [join_paths('test', 'props.c')]
c_args = ['-fvisibility=hidden',
'-ffast-math']
mod = shared_module('props', dsp_srcs,
c_args : c_args,
include_directories : inc_dir,
name_prefix : '',
dependencies : [m_dep, lv2_dep],
install : true,
install_dir : inst_dir)
version = run_command('cat', 'VERSION').stdout().strip().split('.')
conf_data.set('MAJOR_VERSION', version[0])
conf_data.set('MINOR_VERSION', version[1])
conf_data.set('MICRO_VERSION', version[2])
suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
configure_file(input : join_paths('test', 'manifest.ttl.in'), output : 'manifest.ttl',
configuration : conf_data,
install : true,
install_dir : inst_dir)
custom_target('props_ttl',
input : join_paths('test', 'props.ttl'),
output : 'props.ttl',
command : clone,
install : true,
install_dir : inst_dir)
custom_target('chunk_bin',
input : join_paths('test', 'chunk.bin'),
output : 'chunk.bin',
command : clone,
install : true,
install_dir : inst_dir)
[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
[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']
c_link_args = ['-m32', '-Wl,-z,defs']
needs_exe_wrapper = false
[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
[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
[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
[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
......@@ -22,7 +22,7 @@
# Orbit Looper
props:test
a lv2:Plugin ;
lv2:minorVersion @PROPS_MINOR_VERSION@ ;
lv2:microVersion @PROPS_MICRO_VERSION@ ;
lv2:binary <props@LIB_EXT@> ;
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <props@MODULE_SUFFIX@> ;
rdfs:seeAlso <props.ttl> .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment