Skip to content

Commit

Permalink
Install all thirdparty licenses.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Dec 11, 2012
1 parent 9db16b3 commit 8fae49d
Show file tree
Hide file tree
Showing 14 changed files with 161 additions and 47 deletions.
91 changes: 51 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
#
Expand All @@ -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 ()
Expand All @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
8 changes: 7 additions & 1 deletion thirdparty/getopt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
45 changes: 45 additions & 0 deletions thirdparty/getopt/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions thirdparty/less/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ install (

install (
FILES LICENSE
DESTINATION doc
RENAME LICENSE.less
DESTINATION ${DOC_INSTALL_DIR}
RENAME LICENSE-less.txt
)
8 changes: 7 additions & 1 deletion thirdparty/libpng/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
25 changes: 25 additions & 0 deletions thirdparty/msinttypes/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 10 additions & 1 deletion thirdparty/qjson/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 1 deletion thirdparty/snappy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
8 changes: 7 additions & 1 deletion thirdparty/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.