Commit Graph

13 Commits

Author SHA1 Message Date
PierreNav
4e359f5c35 Add DLL files to the INSTALL target 2017-05-23 11:16:15 +02: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
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
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
Przemyslaw Skibinski
fbede33fd7 fixed Travis tests 2016-11-04 16:56:01 +01:00
Yann Collet
f173027690 moved cmake and debian directories to contrib (#245) 2016-11-01 17:29:15 -07:00