3

I am developing a BSD 3-clause library. In the root of the repository, I have the full license text, and at the top of each file something like

/* This file is part of <project name>, developed my <me>.
 * 
 * All rights reserved. Use of this source code is governed
 * by a BSD-style license that can be found in the LICENSE.txt file:
 *
 *     <url to LICENSE.txt>
 */

I am satisfied with this for files that are truly of my own origin. However, lets consider file foo.cpp, that has code adapted from two separate libraries.

  1. The Point Cloud Library {BSD v3 as well}.
  2. OpenCV {BSD v3 as well}.

So I started doing

/****************************************
 *
 * full PCL license
 *
 ****************************************
 *
 * full OpenCV license
 *
 ****************************************
 *
 * my blurb
 *
 ***************************************/

Is including all licenses at the top the most appropriate?

Is there a clearer way of citing the proper source? I've done my best to make sure that in both the code and documentation it is clear where the original source came from, but "license dumping" at the top of the file makes it less clear. For example, one of the files also brings in an Apache v2 license (also compatible), which makes the licensing of the file significantly longer than the actual code in the file. That is not a problem, it's just getting to the point where I feel like I'm doing it wrong.

The final question: is it acceptable to update the license years to what is shown in the main LICENSE of the repository? For example, one file I transcribed code from had a 2012 license listed at the top. The main repo has an identical license, but includes up to 2018 (which is why I prefer the "blurb" approach for my own files). This part of the question may not be on-topic though, if so I will delete this part.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.