Include previously missing licenses in builds

Specifically, this commit only adds copies of licenses if we are
required to do so. For example, this commit adds a copy of libacm’s
license because libacm’s license requires that we include copies of
libacm’s license with binary copies of libacm. This commit does not add
a copy of zlib’s license because zlib’s license doesn’t require us to do
so.

Fixes #295.
This commit is contained in:
Jason Yundt 2024-05-07 07:57:00 -04:00
parent 2bb1e4167a
commit 8fd26f0cc1
2 changed files with 17 additions and 3 deletions

View File

@ -312,8 +312,9 @@ if(BUILD_TESTING)
add_subdirectory(tests)
endif()
add_custom_target(LicenseFile
add_custom_target(LicenseFiles
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/LICENSE" $<TARGET_FILE_DIR:Descent3>
COMMENT "Create LICENSE file"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/third_party_licenses" "$<TARGET_FILE_DIR:Descent3>/Third-party licenses"
COMMENT "Create license files"
)
add_dependencies(Descent3 LicenseFile)
add_dependencies(Descent3 LicenseFiles)

View File

@ -0,0 +1,13 @@
Copyright (c) 2004-2010, Marko Kreen
Permission to use, copy, modify, and/or 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.