Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the author permit re-licensing the cmake code for extracting package name and version from package.xml? #8

Closed
Levi-Armstrong opened this issue Jan 4, 2021 · 4 comments

Comments

@Levi-Armstrong
Copy link
Member

I would like to us the following cmake code for my project but would like use my projects licenses and avoid adding BSD-3. I believe in order to use the Apache 2 license I need permission of the author to do so.

  # Read the package manifest.
  file(READ "${CMAKE_CURRENT_SOURCE_DIR}/package.xml" package_xml_str)

  # Extract project name.
  if(NOT package_xml_str MATCHES "<name>([A-Za-z0-9_]+)</name>")
    message(FATAL_ERROR "Could not parse project name from package manifest (aborting)")
  else()
    set(${prefix}_extracted_name ${CMAKE_MATCH_1})
  endif()

  # Extract project version.
  if(NOT package_xml_str MATCHES "<version>([0-9]+.[0-9]+.[0-9]+)</version>")
    message(FATAL_ERROR "Could not parse project version from package manifest (aborting)")
  else()
    set(${prefix}_extracted_version ${CMAKE_MATCH_1})
  endif()
@gavanderhoorn
Copy link
Member

gavanderhoorn commented Jan 4, 2021

Out of curiosity: both Apache v2 and BSD are pretty liberal, and are actually compatible with one another (IANAL and IIRC). Would it be a problem to add a notice stating that particular snippet came from another project and is licensed under a different (but compatible) license?


Edit: and to be precise: that snippet eventually comes from abb_libegm (here), which was merged in in ros-industrial/abb_libegm#63, which took it from ros-industrial/abb_libegm#63 (comment).

@Levi-Armstrong
Copy link
Member Author

Out of curiosity: both Apache v2 and BSD are pretty liberal, and are actually compatible with one another (IANAL and IIRC). Would it be a problem to add a notice stating that particular snippet came from another project and is licensed under a different (but compatible) license?

I don't think so for the my case (Apache v2) but not sure if it would be an issue for other packages with different licenses. I just think this piece of code is very useful and could be used by all ROS packages.

@gavanderhoorn
Copy link
Member

Again, IANAL, but if you're include(..)-ing something from another package, that would not necessarily seem to immediately affect what license your own package is under. Compare with GPL-ed packages providing you with a *Config.cmake. find_package(..)-ing those packages does not make your own package GPL.

I can't really find any CMake-specific examples wrt licensing, but it's not a compiled and/or linked language system, so I would expect things to be different from those.

@Levi-Armstrong
Copy link
Member Author

Again, IANAL, but if you're include(..)-ing something from another package, that would not necessarily seem to immediately affect what license your own package is under. Compare with GPL-ed packages providing you with a *Config.cmake. find_package(..)-ing those packages does not make your own package GPL.

I agree, in the case if this is added to cmake_common_scripts and I just added BSD-3 license to it, then this would be the only affected package. Though if someone wanted to use the snippet and not use say cmake_common_scripts then they too would need to add a BSD-3 license to there package unless the author gives permission to change the license for this code snippet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants