From 42ba505ceb6ae323afb12b07dcec11255ba8f4b7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 9 Mar 2018 11:13:42 -0500 Subject: [PATCH] CMake: add license headers, copyright Since we install the CMake files now, also put license headers in them. These files are intended to help plugin and branding component authors write them in a simple Calamares-idiomatic way. --- .../CalamaresAddBrandingSubdirectory.cmake | 20 ++++++++++++++++ CMakeModules/CalamaresAddLibrary.cmake | 24 ++++++++++++++++++- .../CalamaresAddModuleSubdirectory.cmake | 23 ++++++++++++++++++ CMakeModules/CalamaresAddPlugin.cmake | 20 ++++++++++++++++ CMakeModules/CalamaresAddTranslations.cmake | 22 +++++++++++++++++ 5 files changed, 108 insertions(+), 1 deletion(-) diff --git a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake index 60868192b..40c153ef7 100644 --- a/CMakeModules/CalamaresAddBrandingSubdirectory.cmake +++ b/CMakeModules/CalamaresAddBrandingSubdirectory.cmake @@ -1,3 +1,23 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares 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 GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# # Support macros for creating Calamares branding components. # # Calamares branding components have two parts: diff --git a/CMakeModules/CalamaresAddLibrary.cmake b/CMakeModules/CalamaresAddLibrary.cmake index f183277c8..f6e96d12a 100644 --- a/CMakeModules/CalamaresAddLibrary.cmake +++ b/CMakeModules/CalamaresAddLibrary.cmake @@ -1,3 +1,25 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares 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 GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# +# Support functions for building plugins. + include( CMakeParseArguments ) function(calamares_add_library) @@ -64,7 +86,7 @@ function(calamares_add_library) endif() # add link targets - target_link_libraries(${target} + target_link_libraries(${target} LINK_PUBLIC ${CALAMARES_LIBRARIES} Qt5::Core Qt5::Gui diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 32d9ea952..af26f5a74 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -1,3 +1,26 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares 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 GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# +# Function and support code for adding a Calamares module (either a Qt / C++ plugin, +# or a Python module, or whatever) to the build. +# include( CalamaresAddTranslations ) set( MODULE_DATA_DESTINATION share/calamares/modules ) diff --git a/CMakeModules/CalamaresAddPlugin.cmake b/CMakeModules/CalamaresAddPlugin.cmake index 658fd364a..e02102829 100644 --- a/CMakeModules/CalamaresAddPlugin.cmake +++ b/CMakeModules/CalamaresAddPlugin.cmake @@ -1,3 +1,23 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares 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 GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# # Convenience function for creating a C++ (qtplugin) module for Calamares. # This function provides cmake-time feedback about the plugin, adds # targets for compilation and boilerplate information, and creates diff --git a/CMakeModules/CalamaresAddTranslations.cmake b/CMakeModules/CalamaresAddTranslations.cmake index b0a623908..63bf63189 100644 --- a/CMakeModules/CalamaresAddTranslations.cmake +++ b/CMakeModules/CalamaresAddTranslations.cmake @@ -1,3 +1,25 @@ +# === This file is part of Calamares - === +# +# Calamares is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Calamares 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 GNU General Public License +# along with Calamares. If not, see . +# +# SPDX-License-Identifier: GPL-3.0+ +# License-Filename: LICENSE +# +### +# +# This file has not yet been documented for use outside of Calamares itself. + include( CMakeParseArguments ) # Internal macro for adding the C++ / Qt translations to the