diff --git a/.travis.yml b/.travis.yml index 07e01a0..ecf1d2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,15 @@ d: - ldc-beta before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv global system 3.6; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip3 install meson; fi install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir .ntmp && curl -L https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip -o .ntmp/ninja-linux.zip; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir .ntmp && curl -L https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip -o .ntmp/ninja-linux.zip; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unzip .ntmp/ninja-linux.zip -d .ntmp; fi before_script: diff --git a/meson.build b/meson.build index 104b4f2..0d6d1aa 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,8 @@ -project('tinyendian', 'd', meson_version: '>=0.40.0') +project('tinyendian', 'd', + meson_version: '>=0.40', + version: '0.1.2' +) -project_version = '0.1.2' project_soversion = '0' src_dir = include_directories('source/') @@ -15,13 +17,19 @@ tinyendian_lib = static_library('tinyendian', [tinyendian_src], include_directories: [src_dir], install: true, - version: project_version, + version: meson.project_version(), soversion: project_soversion, pic: true ) pkgc.generate(name: 'tinyendian', libraries: tinyendian_lib, subdirs: 'd/', - version: project_version, + version: meson.project_version(), description: 'Lightweight endianness library for D.' ) + +# Make Tinyendian easy to use as subproject +tinyendian_dep = declare_dependency( + link_with: tinyendian_lib, + include_directories: [src_dir] +)