summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-01-02 14:33:15 (GMT)
committerMichał Górny <mgorny@gentoo.org>2017-01-02 15:34:57 (GMT)
commit1380c33b7349507e1d51b505a2f4ee8ab126c587 (patch)
treefdeeca81436c5d68b873e8bb6d6fd8bde427a561 /contrib
parent28db4acc90805c8bcc183b788900ac566b0346d1 (diff)
downloadlz4-1380c33b7349507e1d51b505a2f4ee8ab126c587.zip
lz4-1380c33b7349507e1d51b505a2f4ee8ab126c587.tar.gz
lz4-1380c33b7349507e1d51b505a2f4ee8ab126c587.tar.bz2
cmake: Install lz4cat and unlz4 symlinks
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cmake_unofficial/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/cmake_unofficial/CMakeLists.txt b/contrib/cmake_unofficial/CMakeLists.txt
index df16d46..38f3b00 100644
--- a/contrib/cmake_unofficial/CMakeLists.txt
+++ b/contrib/cmake_unofficial/CMakeLists.txt
@@ -177,6 +177,18 @@ if(NOT LZ4_BUNDLED_MODE)
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblz4.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
+ # install lz4cat and unlz4 symlinks on *nix
+ if(UNIX)
+ install(CODE "
+ foreach(f lz4cat unlz4)
+ set(dest \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/\${f}\")
+ message(STATUS \"Symlinking: \${dest} -> lz4\")
+ execute_process(
+ COMMAND \"${CMAKE_COMMAND}\" -E create_symlink lz4 \"\${dest}\")
+ endforeach()
+ ")
+ endif(UNIX)
endif(NOT LZ4_BUNDLED_MODE)
# pkg-config