From 8fae49d8ccee46f43bb06f035dd5b3ea105ba3aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 11 Dec 2012 07:22:16 +0000 Subject: [PATCH] Install all thirdparty licenses. --- CMakeLists.txt | 91 ++++++++++++---------- thirdparty/getopt/CMakeLists.txt | 8 +- thirdparty/getopt/LICENSE | 45 +++++++++++ thirdparty/less/CMakeLists.txt | 4 +- thirdparty/libpng/CMakeLists.txt | 8 +- thirdparty/{msvc => msinttypes}/.gitignore | 0 thirdparty/msinttypes/LICENSE | 25 ++++++ thirdparty/{msvc => msinttypes}/Makefile | 0 thirdparty/{msvc => msinttypes}/inttypes.h | 0 thirdparty/{msvc => msinttypes}/stdbool.h | 0 thirdparty/{msvc => msinttypes}/stdint.h | 0 thirdparty/qjson/CMakeLists.txt | 11 ++- thirdparty/snappy/CMakeLists.txt | 8 +- thirdparty/zlib/CMakeLists.txt | 8 +- 14 files changed, 161 insertions(+), 47 deletions(-) create mode 100644 thirdparty/getopt/LICENSE rename thirdparty/{msvc => msinttypes}/.gitignore (100%) create mode 100644 thirdparty/msinttypes/LICENSE rename thirdparty/{msvc => msinttypes}/Makefile (100%) rename thirdparty/{msvc => msinttypes}/inttypes.h (100%) rename thirdparty/{msvc => msinttypes}/stdbool.h (100%) rename thirdparty/{msvc => msinttypes}/stdint.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 549d066..3ec2629 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,8 +106,8 @@ else (WIN32) endif () if (MSVC) - # C99 includes for msvc - include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/msvc) + # C99 includes for MSVC + include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/msinttypes) # Enable math constants defines add_definitions (-D_USE_MATH_DEFINES) @@ -181,6 +181,38 @@ endif () set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +############################################################################## +# Installation directories + +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + # Debian multiarch support + execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH + OUTPUT_VARIABLE ARCH_SUBDIR + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() + +if (WIN32 OR APPLE) + # On Windows/MacOSX, applications are usually installed on a directory of + # their own + set (DOC_INSTALL_DIR doc) + set (LIB_INSTALL_DIR lib) + set (LIB_ARCH_INSTALL_DIR lib) +else () + set (DOC_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME}) + set (LIB_INSTALL_DIR lib/${CMAKE_PROJECT_NAME}) + if (ARCH_SUBDIR) + set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME}) + else () + set (LIB_ARCH_INSTALL_DIR lib/${CMAKE_PROJECT_NAME}) + endif () +endif () + +set (SCRIPTS_INSTALL_DIR ${LIB_INSTALL_DIR}/scripts) +set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers) + + ############################################################################## # Bundled dependencies # @@ -191,13 +223,13 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib) set (ZLIB_LIBRARIES z_bundled) -add_subdirectory (thirdparty/zlib EXCLUDE_FROM_ALL) +add_subdirectory (thirdparty/zlib) include_directories (${ZLIB_INCLUDE_DIRS}) set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy) set (SNAPPY_LIBRARIES snappy_bundled) -add_subdirectory (thirdparty/snappy EXCLUDE_FROM_ALL) +add_subdirectory (thirdparty/snappy) include_directories (${SNAPPY_INCLUDE_DIRS}) @@ -205,10 +237,10 @@ set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng) set (PNG_DEFINITIONS "") set (PNG_LIBRARIES png_bundled) -add_subdirectory (thirdparty/libpng EXCLUDE_FROM_ALL) +add_subdirectory (thirdparty/libpng) if (MSVC) - add_subdirectory (thirdparty/getopt EXCLUDE_FROM_ALL) + add_subdirectory (thirdparty/getopt) include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/getopt) set (GETOPT_LIBRARIES getopt_bundled) endif () @@ -223,7 +255,7 @@ endif () # binaries at all. if (QT4_FOUND) add_definitions (-DQJSON_EXPORT=) - add_subdirectory (thirdparty/qjson EXCLUDE_FROM_ALL) + add_subdirectory (thirdparty/qjson) set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) set (QJSON_LIBRARY_DIRS) set (QJSON_LIBRARIES qjson_bundled) @@ -237,38 +269,6 @@ endif () include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khronos) -############################################################################## -# Installation directories - -if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - # Debian multiarch support - execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH - OUTPUT_VARIABLE ARCH_SUBDIR - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -endif() - -if (WIN32 OR APPLE) - # On Windows/MacOSX, applications are usually installed on a directory of - # their own - set (DOC_INSTALL_DIR doc) - set (LIB_INSTALL_DIR lib) - set (LIB_ARCH_INSTALL_DIR lib) -else () - set (DOC_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME}) - set (LIB_INSTALL_DIR lib/${CMAKE_PROJECT_NAME}) - if (ARCH_SUBDIR) - set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME}) - else () - set (LIB_ARCH_INSTALL_DIR lib/${CMAKE_PROJECT_NAME}) - endif () -endif () - -set (SCRIPTS_INSTALL_DIR ${LIB_INSTALL_DIR}/scripts) -set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers) - - ############################################################################## # Common libraries / utilities @@ -368,11 +368,22 @@ endif () install ( FILES BUGS.markdown - LICENSE NEWS.markdown README.markdown DESTINATION ${DOC_INSTALL_DIR} ) +install ( + FILES LICENSE + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE.txt +) +if (MSVC) + install ( + FILES thirdparty/msinttypes/LICENSE + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-msinttypes.txt + ) +endif () set (CPACK_PACKAGE_VERSION_MAJOR "3") set (CPACK_PACKAGE_VERSION_MINOR "0") diff --git a/thirdparty/getopt/CMakeLists.txt b/thirdparty/getopt/CMakeLists.txt index fc46f7d..224fc1e 100644 --- a/thirdparty/getopt/CMakeLists.txt +++ b/thirdparty/getopt/CMakeLists.txt @@ -1,5 +1,11 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}) -add_library (getopt_bundled STATIC +add_library (getopt_bundled STATIC EXCLUDE_FROM_ALL getopt_long.c ) + +install ( + FILES LICENSE + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-getopt.txt +) diff --git a/thirdparty/getopt/LICENSE b/thirdparty/getopt/LICENSE new file mode 100644 index 0000000..1a9141b --- /dev/null +++ b/thirdparty/getopt/LICENSE @@ -0,0 +1,45 @@ +Copyright (c) 2002 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Sponsored in part by the Defense Advanced Research Projects +Agency (DARPA) and Air Force Research Laboratory, Air Force +Materiel Command, USAF, under agreement number F39502-99-1-0512. + + +Copyright (c) 2000 The NetBSD Foundation, Inc. +All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation +by Dieter Baron and Thomas Klausner. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/less/CMakeLists.txt b/thirdparty/less/CMakeLists.txt index 95e7175..ef4eba6 100644 --- a/thirdparty/less/CMakeLists.txt +++ b/thirdparty/less/CMakeLists.txt @@ -31,6 +31,6 @@ install ( install ( FILES LICENSE - DESTINATION doc - RENAME LICENSE.less + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-less.txt ) diff --git a/thirdparty/libpng/CMakeLists.txt b/thirdparty/libpng/CMakeLists.txt index 7775f91..7cf2be9 100644 --- a/thirdparty/libpng/CMakeLists.txt +++ b/thirdparty/libpng/CMakeLists.txt @@ -1,6 +1,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -add_library (png_bundled STATIC +add_library (png_bundled STATIC EXCLUDE_FROM_ALL png.c pngerror.c pngget.c @@ -21,3 +21,9 @@ add_library (png_bundled STATIC set_target_properties (png_bundled PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}" ) + +install ( + FILES LICENSE + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-libpng.txt +) diff --git a/thirdparty/msvc/.gitignore b/thirdparty/msinttypes/.gitignore similarity index 100% rename from thirdparty/msvc/.gitignore rename to thirdparty/msinttypes/.gitignore diff --git a/thirdparty/msinttypes/LICENSE b/thirdparty/msinttypes/LICENSE new file mode 100644 index 0000000..7af067d --- /dev/null +++ b/thirdparty/msinttypes/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2006-2008 Alexander Chemeris + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/thirdparty/msvc/Makefile b/thirdparty/msinttypes/Makefile similarity index 100% rename from thirdparty/msvc/Makefile rename to thirdparty/msinttypes/Makefile diff --git a/thirdparty/msvc/inttypes.h b/thirdparty/msinttypes/inttypes.h similarity index 100% rename from thirdparty/msvc/inttypes.h rename to thirdparty/msinttypes/inttypes.h diff --git a/thirdparty/msvc/stdbool.h b/thirdparty/msinttypes/stdbool.h similarity index 100% rename from thirdparty/msvc/stdbool.h rename to thirdparty/msinttypes/stdbool.h diff --git a/thirdparty/msvc/stdint.h b/thirdparty/msinttypes/stdint.h similarity index 100% rename from thirdparty/msvc/stdint.h rename to thirdparty/msinttypes/stdint.h diff --git a/thirdparty/qjson/CMakeLists.txt b/thirdparty/qjson/CMakeLists.txt index 512efc8..f142371 100644 --- a/thirdparty/qjson/CMakeLists.txt +++ b/thirdparty/qjson/CMakeLists.txt @@ -27,4 +27,13 @@ set (qjson_SRCS #serializerrunnable.cpp ) -add_library (qjson_bundled STATIC ${qjson_SRCS} ${qjson_MOC_SRCS}) +add_library (qjson_bundled STATIC EXCLUDE_FROM_ALL + ${qjson_SRCS} + ${qjson_MOC_SRCS} +) + +install ( + FILES COPYING.lib + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-qjson.txt +) diff --git a/thirdparty/snappy/CMakeLists.txt b/thirdparty/snappy/CMakeLists.txt index 9bbecdb..25281a6 100644 --- a/thirdparty/snappy/CMakeLists.txt +++ b/thirdparty/snappy/CMakeLists.txt @@ -8,7 +8,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) add_definitions (-Wno-unused-function) endif () -add_library (snappy_bundled STATIC +add_library (snappy_bundled STATIC EXCLUDE_FROM_ALL snappy.cc snappy-sinksource.cc snappy-stubs-internal.cc @@ -18,3 +18,9 @@ add_library (snappy_bundled STATIC set_target_properties (snappy_bundled PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" ) + +install ( + FILES COPYING + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-snappy.txt +) diff --git a/thirdparty/zlib/CMakeLists.txt b/thirdparty/zlib/CMakeLists.txt index b1e953d..3cf970e 100644 --- a/thirdparty/zlib/CMakeLists.txt +++ b/thirdparty/zlib/CMakeLists.txt @@ -9,7 +9,7 @@ else () add_definitions (-DHAVE_UNISTD_H) endif () -add_library (z_bundled STATIC +add_library (z_bundled STATIC EXCLUDE_FROM_ALL adler32.c compress.c crc32.c @@ -30,3 +30,9 @@ add_library (z_bundled STATIC set_target_properties (z_bundled PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}" ) + +install ( + FILES README + DESTINATION ${DOC_INSTALL_DIR} + RENAME LICENSE-zlib.txt +) -- 2.43.0