diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2014-01-07 18:47:50 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2014-01-07 18:47:50 (GMT) |
commit | 648678788c751c0d89737dbb8b3144fa9d2c1592 (patch) | |
tree | e0e85353deca4f11bab61c46d94783a81c9e2ec5 /cmake | |
parent | fb38ddaacb150e05b9d73c2a08d052ce746e37ba (diff) | |
download | lz4-648678788c751c0d89737dbb8b3144fa9d2c1592.zip lz4-648678788c751c0d89737dbb8b3144fa9d2c1592.tar.gz lz4-648678788c751c0d89737dbb8b3144fa9d2c1592.tar.bz2 |
Makefile : added capability to install libraries
Modified Directory tree, to better separate libraries from programs.
git-svn-id: https://lz4.googlecode.com/svn/trunk@111 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 80 | ||||
-rw-r--r-- | cmake/pack/CMakeLists.txt | 82 | ||||
-rw-r--r-- | cmake/pack/release_COPYING.txt | 21 |
3 files changed, 0 insertions, 183 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt deleted file mode 100644 index b922641..0000000 --- a/cmake/CMakeLists.txt +++ /dev/null @@ -1,80 +0,0 @@ -PROJECT(LZ4 C)
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 compression library")
-set(CPACK_PACKAGE_VERSION_MAJOR 0)
-set(CPACK_PACKAGE_VERSION_MINOR 0)
-set(CPACK_PACKAGE_VERSION_PATCH r110)
-#set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_BINARY_DIR}/COPYING_LGPL)
-set(VERSION_STRING " \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\" ")
-include(CPack)
-
-cmake_minimum_required (VERSION 2.6)
-INCLUDE (CheckTypeSize)
-check_type_size("void *" SIZEOF_VOID_P)
-IF( ${SIZEOF_VOID_P} STREQUAL "8" )
- set (CMAKE_SYSTEM_PROCESSOR "64bit")
- MESSAGE( STATUS "64 bit architecture detected size of void * is " ${SIZEOF_VOID_P})
-ENDIF()
-
-option(BUILD_TOOLS "Build the command line tools" ON)
-option(BUILD_LIBS "Build the libraries in addition to the tools" OFF)
-
-if(UNIX AND BUILD_LIBS)
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
- add_definitions(-fPIC)
- endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
-endif()
-
-set(SRC_DIR ../)
-set(LZ4_SRCS_LIB ${SRC_DIR}lz4.c ${SRC_DIR}lz4hc.c ${SRC_DIR}lz4.h )
-set(LZ4_SRCS ${SRC_DIR}xxhash.c ${SRC_DIR}bench.c ${SRC_DIR}lz4cli.c)
-
-if(BUILD_TOOLS AND NOT BUILD_LIBS)
- set(LZ4_SRCS ${LZ4_SRCS} ${LZ4_SRCS_LIB})
-endif()
-
-if(BUILD_TOOLS)
- add_executable(lz4 ${LZ4_SRCS})
- set_target_properties(lz4 PROPERTIES COMPILE_DEFINITIONS DISABLE_LZ4C_LEGACY_OPTIONS)
- install(TARGETS lz4 RUNTIME DESTINATION "bin/")
- add_executable(lz4c ${LZ4_SRCS})
- install(TARGETS lz4c RUNTIME DESTINATION "bin/")
-endif()
-
-if(BUILD_LIBS)
- add_library(liblz4 ${LZ4_SRCS_LIB})
-
- set_target_properties(liblz4 PROPERTIES
- OUTPUT_NAME lz4
- SOVERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
- )
-
- install(TARGETS liblz4
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- )
-
- install(FILES
- ${SRC_DIR}/lz4.h
- ${SRC_DIR}/lz4hc.h
- DESTINATION include
- )
-
- if(BUILD_TOOLS)
- target_link_libraries(lz4 liblz4)
- target_link_libraries(lz4c liblz4)
- endif()
-endif()
-
-
-#warnings
-
-ADD_DEFINITIONS("-Wall")
-ADD_DEFINITIONS("-W")
-ADD_DEFINITIONS("-Wundef")
-ADD_DEFINITIONS("-Wcast-align")
-ADD_DEFINITIONS("-std=c99")
-ADD_DEFINITIONS("-DLZ4_VERSION=\"${CPACK_PACKAGE_VERSION_PATCH}\"")
-INCLUDE_DIRECTORIES (${SRC_DIR})
-
-
-
diff --git a/cmake/pack/CMakeLists.txt b/cmake/pack/CMakeLists.txt deleted file mode 100644 index 7b93cba..0000000 --- a/cmake/pack/CMakeLists.txt +++ /dev/null @@ -1,82 +0,0 @@ -cmake_minimum_required (VERSION 2.8)
-PROJECT(LZ4)
-
-############################## CPACK
-set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../)
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 Packer")
-set(CPACK_PACKAGE_VERSION_MAJOR 0)
-set(CPACK_PACKAGE_VERSION_MINOR 0)
-set(CPACK_PACKAGE_VERSION_PATCH r107)
-#set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_BINARY_DIR}/COPYING_LGPL)
-##############################
-FIND_PACKAGE(Subversion)
-IF(SUBVERSION_FOUND)
- Subversion_WC_INFO(${SRC_DIR} revision)
- set(revision_MY_WC_STATUS "LZ4 has revision ${revision_WC_REVISION} at ${revision_WC_LAST_CHANGED_DATE}")
- message(STATUS ${revision_MY_WC_STATUS})
- if(NOT ${revision_WC_REVISION})
- else(NOT ${revision_WC_REVISION})
- set(CPACK_PACKAGE_VERSION_PATCH "r${revision_WC_REVISION}")
- endif(NOT ${revision_WC_REVISION})
-ELSE(SUBVERSION_FOUND)
- message(WARNING "NO Subversion FOUND!!!")
-ENDIF(SUBVERSION_FOUND)
-set(VERSION_STRING " \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\" ")
-##############################
-INCLUDE (CheckTypeSize)
-check_type_size("void *" SIZEOF_VOID_P)
-IF( ${SIZEOF_VOID_P} STREQUAL "8" )
- set (CMAKE_SYSTEM_PROCESSOR "64bit")
- MESSAGE( STATUS "64 bit architecture detected size of void * is " ${SIZEOF_VOID_P})
-ENDIF()
-############################### warnings
-
-ADD_DEFINITIONS("-Wall")
-ADD_DEFINITIONS("-W")
-ADD_DEFINITIONS("-Wundef")
-ADD_DEFINITIONS("-Wcast-align")
-ADD_DEFINITIONS("-Wno-implicit-function-declaration")
-ADD_DEFINITIONS("-O3 -march=native -std=c99")
-INCLUDE_DIRECTORIES (${SRC_DIR})
-
-
-
-set(LZ4_SRCS_LIB ${SRC_DIR}lz4.c ${SRC_DIR}lz4hc.c ${SRC_DIR}lz4.h ${SRC_DIR}lz4_format_description.txt)
-set(LZ4_SRCS ${LZ4_SRCS_LIB} ${SRC_DIR}xxhash.c ${SRC_DIR}bench.c ${SRC_DIR}lz4cli.c )
-set(FUZZER_SRCS ${SRC_DIR}lz4.c ${SRC_DIR}lz4hc.c ${SRC_DIR}lz4.h ${SRC_DIR}fuzzer.c)
-
-# EXECUTABLES FOR 32 Bit and 64 versions
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "64bit")
- add_executable(lz4c32 ${LZ4_SRCS})
- install(TARGETS lz4c32 RUNTIME DESTINATION "bin/")
-SET_TARGET_PROPERTIES(lz4c32 PROPERTIES
- COMPILE_FLAGS PROPERTIES COMPILE_FLAGS "-m32 -Os" LINK_FLAGS "-m32")
-endif()
-
-add_executable(lz4c ${LZ4_SRCS})
-install(TARGETS lz4c RUNTIME DESTINATION "bin/")
-
-add_executable(fuzzer ${FUZZER_SRCS})
-install(TARGETS fuzzer RUNTIME DESTINATION "bin/")
-
-#target_link_libraries(lz4 ${LZ4_SRCS_LIB})
-####################### CPACK PACKAGING ###################
-install(FILES ${SRC_DIR}lz4_format_description.txt DESTINATION "./")
-
-set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/release_COPYING.txt")
-set(CPACK_PACKAGE_VENDOR "Yann Collet")
-set(CPACK_WWW_SITE "http://fastcompression.blogspot.com/p/lz4.html")
-set(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_WWW_SITE}")
-set(CPACK_NSIS_HELP_LINK "${CPACK_WWW_SITE}")
-
-set(CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_NAME})
-set(CPACK_NSIS_COMPRESSOR "/SOLID lzma \r\n SetCompressorDictSize 32")
-
-set(CPACK_NSIS_MENU_LINKS
- "${CPACK_WWW_SITE}" "${CPACK_PACKAGE_NAME} homepage"
- "/lz4_format_description.txt " "lz4 format description"
- "/" "LZ4 directory "
-)
-
-include (CPack)
diff --git a/cmake/pack/release_COPYING.txt b/cmake/pack/release_COPYING.txt deleted file mode 100644 index 32cec0d..0000000 --- a/cmake/pack/release_COPYING.txt +++ /dev/null @@ -1,21 +0,0 @@ -
- lz4demo and fuzzer is an open-source demo compression algorithm LZ4 programs
- Copyright (C) Yann Collet 2012
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- You can contact the author at :
- - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
- - LZ4 source repository : http://code.google.com/p/lz4/
|