Permalink
Browse files

Install all thirdparty licenses.

  • Loading branch information...
jrfonseca committed Dec 11, 2012
1 parent 9db16b3 commit 8fae49d8ccee46f43bb06f035dd5b3ea105ba3aa
View
@@ -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,24 +223,24 @@ 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})
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")
@@ -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
+)
View
@@ -0,0 +1,45 @@
+Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
+
+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.
@@ -31,6 +31,6 @@ install (
install (
FILES LICENSE
- DESTINATION doc
- RENAME LICENSE.less
+ DESTINATION ${DOC_INSTALL_DIR}
+ RENAME LICENSE-less.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
+)
File renamed without changes.
@@ -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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
+)
@@ -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
+)
@@ -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
+)

0 comments on commit 8fae49d

Please sign in to comment.