From ceb4f24f7c0ad6d43cdad8cab8c814b78fc07780 Mon Sep 17 00:00:00 2001 From: Freeman Zhang Date: Fri, 2 Mar 2018 16:46:12 +0800 Subject: [PATCH] Clean up and add license info in cmake configs. --- CMakeLists.txt | 26 ++++++++++++++++++++++---- unstable/CMakeLists.txt | 20 ++++++++++++++++++++ unstable/xdg-shell/CMakeLists.txt | 29 ++++++++++++++++++++--------- 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 023caf7..76b29bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,23 @@ +# Copyright 2017 - 2018 Freeman Zhang +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + cmake_minimum_required(VERSION 3.1) project(wayland-protocols-binaries VERSION 1.13) @@ -5,10 +25,8 @@ project(wayland-protocols-binaries VERSION 1.13) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules/") find_package(Wayland REQUIRED) -if (WAYLAND_FOUND) - include_directories(${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR}) - set(LIBS ${LIBS} ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_EGL_LIBRARIES}) -endif () +include_directories(${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR}) +set(LIBS ${LIBS} ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_EGL_LIBRARIES}) set(WAYLAND_PROTOCOLS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/wayland-protocols) set(WAYLAND_SCANNER wayland-scanner) diff --git a/unstable/CMakeLists.txt b/unstable/CMakeLists.txt index e8a5865..3960bae 100644 --- a/unstable/CMakeLists.txt +++ b/unstable/CMakeLists.txt @@ -1 +1,21 @@ +# Copyright 2017 - 2018 Freeman Zhang +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + add_subdirectory(xdg-shell) \ No newline at end of file diff --git a/unstable/xdg-shell/CMakeLists.txt b/unstable/xdg-shell/CMakeLists.txt index 7a4f46a..e66ddda 100644 --- a/unstable/xdg-shell/CMakeLists.txt +++ b/unstable/xdg-shell/CMakeLists.txt @@ -1,17 +1,28 @@ +# Copyright 2017 - 2018 Freeman Zhang +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. set(XDG_SHELL_V6_XML ${WAYLAND_PROTOCOLS_SOURCE_DIR}/unstable/xdg-shell/xdg-shell-unstable-v6.xml) set(XDG_SHELL_V6_CLIENT_HEADER "xdg-shell-unstable-v6-client-protocol.h") set(XDG_SHELL_V6_SERVER_HEADER "xdg-shell-unstable-v6-server-protocol.h") set(XDG_SHELL_V6_SOURCE "xdg-shell-unstable-v6-protocol.c") -#message(STATUS "Generate XDG shell v6 protocol:") -#execute_process( -# COMMAND ${WAYLAND_SCANNER} client-header ${XDG_SHELL_V6_XML} ${XDG_SHELL_V6_CLIENT_HEADER} -# COMMAND ${WAYLAND_SCANNER} server-header ${XDG_SHELL_V6_XML} ${XDG_SHELL_V6_SERVER_HEADER} -# COMMAND ${WAYLAND_SCANNER} code ${XDG_SHELL_V6_XML} ${XDG_SHELL_V6_SOURCE} -# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} -#) - add_library( xdg-shell-unstable-v6 ${XDG_SHELL_V6_CLIENT_HEADER} @@ -25,7 +36,7 @@ add_custom_target( COMMAND ${WAYLAND_SCANNER} server-header ${XDG_SHELL_V6_XML} ${XDG_SHELL_V6_SERVER_HEADER} COMMAND ${WAYLAND_SCANNER} code ${XDG_SHELL_V6_XML} ${XDG_SHELL_V6_SOURCE} DEPENDS ${XDG_SHELL_V6_XML} - COMMENT "Generate xdg shell v6 protocol source files" + COMMENT "Generate xdg shell v6 protocol source files." VERBATIM )