diff options
-rw-r--r-- | .gitlab-ci.yml | 17 | ||||
-rw-r--r-- | CMakeLists.txt | 157 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | cmake/arm-linux-gnueabihf.cmake | 22 | ||||
-rw-r--r-- | cmake/i686-linux-gnu.cmake | 11 | ||||
-rw-r--r-- | cmake/i686-w64-mingw32.cmake | 25 | ||||
-rw-r--r-- | cmake/universal-apple-darwin.cmake | 24 | ||||
-rw-r--r-- | cmake/x86_64-linux-gnu.cmake | 8 | ||||
-rw-r--r-- | cmake/x86_64-w64-mingw32.cmake | 25 | ||||
-rw-r--r-- | manifest.ttl.in | 30 | ||||
-rw-r--r-- | meson.build | 80 | ||||
-rw-r--r-- | meson/arm-linux-gnueabihf | 16 | ||||
-rw-r--r-- | meson/i686-linux-gnu | 17 | ||||
-rw-r--r-- | meson/i686-w64-mingw32 | 16 | ||||
-rw-r--r-- | meson/universal-apple-darwin | 16 | ||||
-rw-r--r-- | meson/x86_64-linux-gnu | 15 | ||||
-rw-r--r-- | meson/x86_64-w64-mingw32 | 16 | ||||
-rw-r--r-- | sherlock.ttl.in (renamed from sherlock.ttl) | 0 | ||||
-rw-r--r-- | sherlock_ui.ttl.in (renamed from sherlock_ui.ttl) | 0 |
19 files changed, 198 insertions, 299 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b79cef..0402690 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,13 @@ stages: - build + - test - deploy .variables_template: &variables_definition variables: BASE_NAME: "sherlock.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" + PKG_CONFIG_PATH: "/opt/lv2/lib/pkgconfig:/opt/${CI_BUILD_NAME}/lib/pkgconfig" + TOOLCHAIN_FILE: "${CI_PROJECT_DIR}/meson/${CI_BUILD_NAME}" .common_template: &common_definition <<: *variables_definition @@ -18,16 +19,10 @@ stages: .build_template: &build_definition <<: *common_definition - before_script: - - apt-get update - - apt-get install -y -q flex 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="/" --libdir="lib" --cross-file "${TOOLCHAIN_FILE}" 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 25b1d52..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,157 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(sherlock.lv2) - -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_SOURCE_DIR}/osc.lv2) -include_directories(${PROJECT_SOURCE_DIR}/props.lv2) -include_directories(${PROJECT_SOURCE_DIR}/ser_atom.lv2) -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(SHERLOCK_UI_TYPE "WindowsUI") -elseif(APPLE) - set(SHERLOCK_UI_TYPE "CocoaUI") -else() - set(SHERLOCK_UI_TYPE "X11UI") -endif() - -file(STRINGS "VERSION" SHERLOCK_VERSION) -string(REPLACE "." ";" VERSION_LIST ${SHERLOCK_VERSION}) -list(GET VERSION_LIST 0 SHERLOCK_MAJOR_VERSION) -list(GET VERSION_LIST 1 SHERLOCK_MINOR_VERSION) -list(GET VERSION_LIST 2 SHERLOCK_MICRO_VERSION) -add_definitions("-DSHERLOCK_VERSION=\"${SHERLOCK_VERSION}\"") - -if(NOT DEFINED PLUGIN_DEST) - set(PLUGIN_DEST lib/lv2/sherlock.lv2) -endif() - -find_package(PkgConfig) # ${PKG_CONFIG_FOUND} - - -set(LIBS_UI m) - -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() - -pkg_search_module(SRATOM REQUIRED sratom-0>=0.4.0) -include_directories(${SRATOM_INCLUDE_DIRS}) -if(DEFINED STATIC_SRATOM) - set(LIBS_UI ${STATIC_SRATOM} ${STATIC_SORD} ${STATIC_SERD} ${LIBS_UI}) -else() - set(LIBS_UI ${LIBS_UI} ${SRATOM_LDFLAGS}) -endif() - - -add_library(sherlock MODULE - sherlock.c - atom_inspector.c - midi_inspector.c - osc_inspector.c) -set_target_properties(sherlock PROPERTIES PREFIX "") -if(NOT WIN32) - set_target_properties(sherlock PROPERTIES LINK_FLAGS "-Wl,-e,lv2_descriptor") -endif() -install(TARGETS sherlock DESTINATION ${PLUGIN_DEST}) - -find_package(FLEX) -flex_target(encoder encoder.l ${PROJECT_BINARY_DIR}/encoder.c - COMPILE_FLAGS "--prefix=enc") - -add_library(sherlock_nk MODULE - sherlock_nk.c - midi_inspector_nk.c - atom_inspector_nk.c - osc_inspector_nk.c - encoder - ${TAR_UI}) -target_link_libraries(sherlock_nk - ${LIBS_UI}) -set_target_properties(sherlock_nk PROPERTIES PREFIX "") -if(NOT WIN32) - set_target_properties(sherlock_nk PROPERTIES LINK_FLAGS "-Wl,-e,lv2ui_descriptor") -endif() -install(TARGETS sherlock_nk 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}/sherlock.ttl DESTINATION ${PLUGIN_DEST}) -install(FILES ${PROJECT_SOURCE_DIR}/sherlock_ui.ttl DESTINATION ${PLUGIN_DEST}) - -install(FILES ${PROJECT_SOURCE_DIR}/nuklear/extra_font/Cousine-Regular.ttf DESTINATION ${PLUGIN_DEST}) @@ -1 +1 @@ -0.17.87 +0.17.105 diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake deleted file mode 100644 index f6d0b2a..0000000 --- a/cmake/arm-linux-gnueabihf.cmake +++ /dev/null @@ -1,22 +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_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/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake deleted file mode 100644 index f00ae3e..0000000 --- a/cmake/i686-linux-gnu.cmake +++ /dev/null @@ -1,11 +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_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/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake deleted file mode 100644 index 3564cad..0000000 --- a/cmake/i686-w64-mingw32.cmake +++ /dev/null @@ -1,25 +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_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(WINE wine32) diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake deleted file mode 100644 index 127e80f..0000000 --- a/cmake/universal-apple-darwin.cmake +++ /dev/null @@ -1,24 +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) - -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 730a594..0000000 --- a/cmake/x86_64-linux-gnu.cmake +++ /dev/null @@ -1,8 +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_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-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake deleted file mode 100644 index 9e90894..0000000 --- a/cmake/x86_64-w64-mingw32.cmake +++ /dev/null @@ -1,25 +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_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(WINE wine64) diff --git a/manifest.ttl.in b/manifest.ttl.in index d71006b..72057e9 100644 --- a/manifest.ttl.in +++ b/manifest.ttl.in @@ -22,41 +22,41 @@ # Atom Inspector Plugin sherlock:atom_inspector a lv2:Plugin ; - lv2:minorVersion @SHERLOCK_MINOR_VERSION@ ; - lv2:microVersion @SHERLOCK_MICRO_VERSION@ ; - lv2:binary <sherlock@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <sherlock@MODULE_SUFFIX@> ; ui:ui sherlock:atom_inspector_4_nk ; rdfs:seeAlso <sherlock.ttl> . sherlock:atom_inspector_4_nk - a ui:@SHERLOCK_UI_TYPE@ ; - ui:binary <sherlock_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <sherlock_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <sherlock_ui.ttl> . # MIDI Inspector Plugin sherlock:midi_inspector a lv2:Plugin ; - lv2:minorVersion @SHERLOCK_MINOR_VERSION@ ; - lv2:microVersion @SHERLOCK_MICRO_VERSION@ ; - lv2:binary <sherlock@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <sherlock@MODULE_SUFFIX@> ; ui:ui sherlock:midi_inspector_4_nk ; rdfs:seeAlso <sherlock.ttl> . sherlock:midi_inspector_4_nk - a ui:@SHERLOCK_UI_TYPE@ ; - ui:binary <sherlock_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <sherlock_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <sherlock_ui.ttl> . # OSC Inspector Plugin sherlock:osc_inspector a lv2:Plugin ; - lv2:minorVersion @SHERLOCK_MINOR_VERSION@ ; - lv2:microVersion @SHERLOCK_MICRO_VERSION@ ; - lv2:binary <sherlock@CMAKE_SHARED_MODULE_SUFFIX@> ; + lv2:minorVersion @MINOR_VERSION@ ; + lv2:microVersion @MICRO_VERSION@ ; + lv2:binary <sherlock@MODULE_SUFFIX@> ; ui:ui sherlock:osc_inspector_4_nk ; rdfs:seeAlso <sherlock.ttl> . sherlock:osc_inspector_4_nk - a ui:@SHERLOCK_UI_TYPE@ ; - ui:binary <sherlock_nk@CMAKE_SHARED_MODULE_SUFFIX@> ; + a ui:@UI_TYPE@ ; + ui:binary <sherlock_nk@MODULE_SUFFIX@> ; rdfs:seeAlso <sherlock_ui.ttl> . diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..607c865 --- /dev/null +++ b/meson.build @@ -0,0 +1,80 @@ +project('sherlock.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') + +m_dep = cc.find_library('m') +lv2_dep = dependency('lv2', version : '>=1.14.0') +gl_dep = dependency('gl') +sratom_dep = dependency('sratom-0', version : '>=0.6.0') + +pugl_inc = include_directories('pugl') +props_inc = include_directories('props.lv2') +osc_inc = include_directories('osc.lv2') +ser_inc = include_directories('ser_atom.lv2') +inc_dir = [pugl_inc, props_inc, osc_inc, ser_inc] + +inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name()) + +rawvers = run_command('cat', 'VERSION').stdout().strip() +version = rawvers.split('.') +conf_data.set('MAJOR_VERSION', version[0]) +conf_data.set('MINOR_VERSION', version[1]) +conf_data.set('MICRO_VERSION', version[2]) + +add_project_arguments('-DSHERLOCK_VERSION="'+rawvers+'"', language : 'c') + +mod = shared_module('sherlock', + 'sherlock.c', + 'atom_inspector.c', + 'midi_inspector.c', + 'osc_inspector.c', + c_args : ['-fvisibility=hidden', '-ffast-math'], + include_directories : inc_dir, + name_prefix : '', + dependencies : [m_dep, lv2_dep], + install : true, + install_dir : inst_dir) + +ui = shared_module('sherlock_ui', + 'sherlock_nk.c', + 'atom_inspector_nk.c', + 'midi_inspector_nk.c', + 'osc_inspector_nk.c', + c_args : ['-fvisibility=hidden', '-ffast-math'], + include_directories : inc_dir, + name_prefix : '', + dependencies : [m_dep, lv2_dep, gl_dep, sratom_dep], + install : true, + install_dir : inst_dir) + +suffix = mod.full_path().strip().split('.')[-1] +conf_data.set('MODULE_SUFFIX', '.' + suffix) + +if host_machine.system() == 'linux' + conf_data.set('UI_TYPE', 'X11UI') +elif host_machine.system() == 'windows' + conf_data.set('UI_TYPE', 'WindowsUI') +elif host_machine.system() == 'windows' + conf_data.set('UI_TYPE', 'CocoaUI') +endif + +configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl', + configuration : conf_data, + install : true, + install_dir : inst_dir) +configure_file(input : 'sherlock.ttl.in', output : 'sherlock.ttl', + configuration : conf_data, + install : true, + install_dir : inst_dir) +configure_file(input : 'sherlock_ui.ttl.in', output : 'sherlock_ui.ttl', + configuration : conf_data, + install : true, + install_dir : inst_dir) 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/sherlock.ttl b/sherlock.ttl.in index c8dab15..c8dab15 100644 --- a/sherlock.ttl +++ b/sherlock.ttl.in diff --git a/sherlock_ui.ttl b/sherlock_ui.ttl.in index 78b62dd..78b62dd 100644 --- a/sherlock_ui.ttl +++ b/sherlock_ui.ttl.in |