Introducing dual-licensing-style 'selective licensing' in case ITAFFT is build...

Introducing dual-licensing-style 'selective licensing' in case ITAFFT is build with FFTW3 backend, which is licensed under copyleft GPL
parent aef90eaa
......@@ -17,7 +17,7 @@ if ( NOT WIN32 )
endif ()
if( NOT DEFINED ITA_FFT_WITH_FFTW3 )
set( ITA_FFT_WITH_FFTW3 ON CACHE BOOL "Build with FFTW3 for fast fourier transforms" )
set( ITA_FFT_WITH_FFTW3 ON CACHE BOOL "Build with FFTW3 for fast fourier transforms (will force the ITA libraries to be select the GNU GPL license)" )
endif( )
if( NOT DEFINED ITA_FFT_WITH_INTEL_MKL10 )
......@@ -51,9 +51,10 @@ set( ITAFFTSources
src/ITAFFTUtils.cpp
)
set( ITA_SELECTIVE_LICENSE_DEPENDENCY_GPL OFF )
if( ITA_FFT_WITH_FFTW3 )
set( ITAFFTSources "${ITAFFTSources}" src/FFTW3Backend.h src/FFTW3Backend.cpp )
add_definitions( -DITAFFT_WITH_FFTW3 )
add_definitions( -DITAFFT_WITH_FFTW3 )
endif( )
if( ITA_FFT_WITH_INTEL_MKL10 )
......@@ -62,7 +63,6 @@ if( ITA_FFT_WITH_INTEL_MKL10 )
endif( )
# compiler settings
# compiler settings
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
......@@ -83,6 +83,30 @@ add_library( ITAFFT ${ITAFFTHeader} ${ITAFFTSources} )
target_link_libraries( ITAFFT ${VISTA_USE_PACKAGE_LIBRARIES} )
# selective license
if( ITA_FFT_WITH_FFTW3 )
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
# Take care of license here
message( "FFTW3 requires copying under the terms of the GNU General Public License. This license includes a copyleft and may require your source code to be published under the same terms. Please respect the license agreements. Will include the GNU GPL COPYING file into distribution." )
set( SELECTED_LICENSE "GNU General Public License" )
set( GPL_DEPENDENCIES "FFTW3" )
configure_file( COPYING.proto ${CMAKE_CURRENT_SOURCE_DIR}/COPYING @ONLY )
install( FILES COPYING DESTINATION . )
else( )
# Pass it on to parent
set( ITA_SELECTIVE_LICENSE_DEPENDENCY_GPL ON PARENT_SCOPE )
endif( )
endif( )
# config
vista_configure_lib( ITAFFT )
vista_install( ITAFFT )
......
Copyright 2015-2018 Institute of Technical Acoustics (ITA), RWTH Aachen University
This binary packages, although generated from code published under
Apache License, Version 2.0 requires distribution under the terms of
the @SELECTED_LICENSE@. Options in the build configuration have been
selected that require linking against libraries that include a copyleft.
GNU GPL dependencies: @GPL_DEPENDENCIES@
> This distribution is subject to VA's selective license dependency and may require you to publish your derived work under a copyleft license as well. The details are described in [README.md](https://git.rwth-aachen.de/ita/ITACoreLibs/) of ITACoreLibs.
This program is free software: you can redistribute it and/or modify
it under the terms of the @SELECTED_LICENSE@ as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the @SELECTED_LICENSE@
along with this program. If not, see <http://www.gnu.org/licenses/>.
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment