Skip to content

Multiple CMake improvements#296

Merged
Cyan4973 merged 4 commits intolz4:devfrom
mgorny:cmake-fixes
Jan 2, 2017
Merged

Multiple CMake improvements#296
Cyan4973 merged 4 commits intolz4:devfrom
mgorny:cmake-fixes

Conversation

@mgorny
Copy link
Copy Markdown
Contributor

@mgorny mgorny commented Jan 2, 2017

In order to get the unofficial CMake production-ready, a few fixes:

  • correct SOVERSION on shared library (assuming the one used in Makefiles is correct),
  • add BUILD_STATIC_LIBS option to support building both shared & static libs simultaneously,
  • install lz4cat and unlz4 symlinks,
  • install manpages.

mgorny added 4 commits January 2, 2017 10:14
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.
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.
@Cyan4973
Copy link
Copy Markdown
Member

Cyan4973 commented Jan 2, 2017

Great patch @mgorny !

@Cyan4973 Cyan4973 merged commit c18a81c into lz4:dev Jan 2, 2017
@Cyan4973 Cyan4973 mentioned this pull request Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants