Commit Graph

54 Commits

Author SHA1 Message Date
Julius Michaelis
b6623e710d meson: move one layer deeper to allow easy construction of a wrap file 2019-09-26 17:29:04 +09:00
Yann Collet
ee23c273e2
Merge pull request #758 from dooxe/develop
Added `BUNDLE	DESTINATION`
2019-07-19 09:11:12 -07:00
dooxe
99d925f997 Added BUNDLE DESTINATION in CMakeLists.txt so that it works with newer versions of cmake 2019-07-18 11:25:43 +02:00
Lzu Tao
ff27a1572b meson: Always build gen_manual on build machine
As gen_manual is using as a generator, not a binary target
installed on host machine.
2019-06-29 10:11:32 +07:00
Lzu Tao
4c60f25c65 meson: Fix deprecated warnings on build options
Meson now reserves `build_` prefix options.
2019-06-29 10:10:05 +07:00
Lzu Tao
cb1be75c84 meson: Rely only on extracted version in lz4.h
So now instead of warning when failing to extract version number
from lz4.h, we error and stop the build instead.
2019-04-30 12:25:40 +07:00
Lzu Tao
dd54ea01a2 contrib: Make Meson build non optional
* Update ninja version to 1.9 in CI.
* Update default project version in meson script.
2019-04-27 01:41:03 +07:00
Lzu Tao
929dbbcddf meson: Add -DLZ4_DLL_EXPORT=1 to build dynamic lib on Windows
Thanks @nacho for pointing it out.
2019-01-23 15:40:26 +07:00
Lzu Tao
d2288d2cc0 meson: Favor warning if cannot find version string 2019-01-11 02:34:16 +07:00
Lzu Tao
4765ad88bd meson: Use libray as required argument in pkgconfig 2019-01-11 02:33:27 +07:00
Lzu Tao
b3b22b9660 meson: Explicit use meson setup to setup a builddir 2019-01-11 02:32:39 +07:00
Yann Collet
6e24ef902a
Merge pull request #620 from lzutao/meson_symlink
Update meson symlink and man1 extension
2018-12-17 09:32:01 -08:00
Lzu Tao
e23d0fb908 meson: Remove unused sys import 2018-12-14 11:12:22 +07:00
Lzu Tao
34dcc5e16d Simplify logic by setting default value for MESON_INSTALL_DESTDIR_PREFIX 2018-12-13 18:08:01 +07:00
Lzu Tao
7f8b0175a9 meson: Update man1 extension in meson 0.49.0 2018-12-13 14:52:51 +07:00
Lzu Tao
54dabaa16c meson: Update InstallSymlink.py usage
Change default directory mode to 755.
2018-12-13 14:31:15 +07:00
Edward Hope-Morley
bd5869a5aa Add snap packaging support
This commit adds a snapcraft.yaml file to allow lz4
to be distributed as a snap (see https://snapcraft.io/
for more info on snaps).

Building the Snap
-----------------

To build the snap simply install snapcraft and build the
snap e.g. on Ubuntu by doing:

$ sudo apt install snapcraft
$ cd contrib; snapcraft

This will build a snap that can be published [1] to
e.g. https://snapcraft.io/lz4

If you want to test the snap before publishing you
can do:

$ snap install <snapname>.snap --dangerous

And that will install it on your local host. You
will then have lz4 as a command to run.

Installing the Snap
-------------------

Once published and released in the snapstore your snap
can be installed on any platform that supports snaps
by doing:

snap install lz4

[1] https://docs.snapcraft.io/releasing-to-the-snap-store
2018-12-12 17:16:01 +00:00
Lzu Tao
58d8055da6 meson: Add README.md for newcomers [skip ci] 2018-12-09 18:57:49 +07:00
Lzu Tao
fbc42958c0 No need to join prefix and let soversion base on version 2018-12-04 10:18:54 +07:00
Lzu Tao
4c43d14891 Use MESON_INSTALL_DESTDIR_PREFIX instead of DESTDIR 2018-12-04 10:18:01 +07:00
Lzu Tao
b4ab8875f9 meson: Add fallback message when not found lz4.h 2018-12-04 00:59:06 +07:00
Lzu Tao
2491af993b meson: Fix wrong path to lib/lz4.h 2018-12-04 00:56:10 +07:00
Lzu Tao
0caeec939f meson: Correct support for Windows build 2018-12-03 22:48:37 +07:00
Lzu Tao
e2fc6bcd1c meson: Update usage of InstallSymlink helper 2018-12-03 22:48:37 +07:00
Lzu Tao
4fe675af1c Use argparse instead of manually parsing [skip ci] 2018-12-03 19:19:21 +07:00
Lzu Tao
a9e96d5c5a meson: Fix soversion and generated pkg-config file [skip ci] 2018-12-03 19:19:02 +07:00
Lzu Tao
4fc4b73586 meson: Use --werror build option instead of passing -Werror [skip ci] 2018-12-03 19:19:02 +07:00
Lzu Tao
5699432d38 meson test: Update timeout and tests that use COPYING 2018-12-03 19:19:02 +07:00
Lzu Tao
5bc119455f Add meson build system 2018-12-02 10:00:27 +07:00
Yann Collet
5a10ed2f7b added cppcheck
as Makefile target and Travis CI test.

Fixed last cppcheck warnings in tests and examples
2018-09-18 16:52:02 -07:00
Yann Collet
697bd904b2 fixed minor cppcheck warnings in examples 2018-09-18 16:30:31 -07:00
Joel Johnson
672ff590b2 Add CMake option to not build legacy lz4c program 2018-08-09 12:40:55 -06:00
Yann Collet
6c23f03b93 fix #482: change CFLAGS to CXXFLAGS
as they are associated with $(CXX)
2018-03-09 11:54:32 -08:00
PierreNav
4e359f5c35 Add DLL files to the INSTALL target 2017-05-23 11:16:15 +02:00
Yann Collet
b8575f2d2b updated Makefile
to automatically build manual files with
make all
2017-05-10 13:26:04 -07:00
Michał Górny
96e150e7df [cmake] Fix substituting version in liblz4.pc
Bug: https://bugs.gentoo.org/608144
2017-02-05 09:47:00 +01:00
Przemyslaw Skibinski
d56ee32b39 updated gen-lz4-manual.sh 2017-01-23 16:33:03 +01:00
Przemyslaw Skibinski
128244371b improved gen_manual 2017-01-23 15:42:58 +01:00
Yann Collet
c18a81c02a Merge pull request #296 from mgorny/cmake-fixes
Multiple CMake improvements
2017-01-03 00:35:42 +01:00
Michał Górny
d7969e49af cmake: Install manpages 2017-01-02 16:34:57 +01:00
Michał Górny
1380c33b73 cmake: Install lz4cat and unlz4 symlinks 2017-01-02 16:34:57 +01:00
Michał Górny
28db4acc90 cmake: Support building shared & static libs simultaneously
Add an additional BUILD_STATIC_LIBS option to control building static
libraries independently of shared. This makes it possible (if both
options are set to ON) to build both shared and static libraries
simulataneously.

A dependant option is used to preserve the current BUILD_SHARED_LIBS
behavior, i.e. -DBUILD_SHARED_LIBS=ON -- shared lib only,
-DBUILD_SHARED_LIBS=OFF -- static lib only.

The targets used to build shared and static library are split now,
and only relevant properties are passed to each of them. An alias is
used to link programs to the preferred library.
2017-01-02 16:34:57 +01:00
Michał Górny
9e867db90a cmake: Fix SOVERSION to match Makefiles
Fix SOVERSION to use only major lz4 version, as Makefiles do. This
ensure that CMake uses 'liblz.so.1' SONAME and creates 'liblz.so.1'
symlink.
2017-01-02 10:14:35 +01:00
Yann Collet
bc0839c5df minor fix for travis-install test 2016-12-21 15:00:43 +01:00
Evan Nemerson
151021a3a6 cmake: add public domain dedication, and a note about the maintainer 2016-11-12 15:53:52 -08:00
Evan Nemerson
b6bcb84eae cmake: make PIC optional when generating a static library
See https://github.com/lz4/lz4/pull/260 for details.  PIC is enabled
by default; to disable it, define the LZ4_POSITION_INDEPENDENT_LIB
variable to ON (cmake -DLZ4_POSITION_INDEPENDENT_LIB=ON ...).
2016-11-12 15:53:52 -08:00
Yann Collet
c72d2f5b10 minor typo 2016-11-10 18:02:56 -08:00
Nick Terrell
5b37837e6e Fix license and remove references to zstd 2016-11-10 17:27:56 -08:00
Przemyslaw Skibinski
a340b734ba added contrib/gen_manual 2016-11-10 17:21:17 +01:00
Evan Nemerson
661c48040e cmake: significant changes to accomodate a new "bundled" mode.
This makes it much easier to include LZ4 in a CMake-based project;
you only need to add_subdirectory(lz4/contrib/cmake_unofficial),
then you can use the lz4 target (which is the library).  In bundled
mode a static library will be built and nothing will be installed,
although the lz4 and lz4c command line tools will still be built.

This also makes some other much less intrusive changes, including:

 * Version information is now parsed from lib/lz4.h so the
   CMakeLists.txt file no longer needs to manually be kept up to date
   manually.
 * pkg-config file uses ${prefix} where appropriate instead of writing
   out full paths, which is important for people on Windows.
 * Warning flags are now checked instead of blindly added.
 * The GNUInstallDirs module is used to determine installation
   locations.
 * The static library generates position independent code, which means
   it's usable when building a shared library.
 * The CLI tools link to liblz4 instead of duplicating the object code.
2016-11-08 13:31:47 -08:00