diff --git a/.gitignore b/.gitignore index 48f8a0cb..b6e56f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -CMakeCache.txt -CMakeFiles -Makefile -cmake_install.cmake install_manifest.txt *.swp *.o diff --git a/CMake/FindA2X.cmake b/CMake/FindA2X.cmake deleted file mode 100644 index b38f5086..00000000 --- a/CMake/FindA2X.cmake +++ /dev/null @@ -1,75 +0,0 @@ -# -# (c)2015 KiCad Developers -# (c)2015 Brian Sidebotham -# -# CMake module to find a2x (part of the asciidoc toolchain). -# -# Variables generated: -# -# A2X_FOUND true when A2X_COMMAND is valid -# A2X_COMMAND The command to run a2x (may be a list including an interpreter) -# A2X_VERSION The a2x version that has been found -# - -# Have a go at finding a a2x executable -find_program( A2X_PROGRAM a2x ) - -# Found something, attempt to try and use it... -if( A2X_PROGRAM ) - execute_process( - COMMAND ${A2X_PROGRAM} --version - OUTPUT_VARIABLE _OUT - ERROR_VARIABLE _ERR - RESULT_VARIABLE _RES - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - # If it worked, set the A2X_COMMAND - if( _RES MATCHES 0 ) - set( A2X_COMMAND "${A2X_PROGRAM}" ) - endif() -endif() - -# If nothing could be found, test to see if we can just find the script file, -# that we'll then run with the python interpreter -if( NOT A2X_COMMAND ) - find_file( A2X_SCRIPT a2x.py ) - - if( A2X_SCRIPT ) - # Find the python interpreter quietly - if( NOT PYTHONINTERP_FOUND ) - find_package( PYTHONINTERP QUIET ) - endif() - - if( NOT PYTHONINTERP_FOUND ) - # Python's not available so can't find a2x... - set( A2X_COMMAND "" ) - else() - # Build the python based command - set( A2X_COMMAND "${PYTHON_EXECUTABLE}" "${A2X_SCRIPT}" ) - - execute_process( - COMMAND ${A2X_COMMAND} --version - OUTPUT_VARIABLE _OUT - ERROR_VARIABLE _ERR - RESULT_VARIABLE _RES - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - # If it still can't be run, then give up - if( NOT _RES MATCHES 0 ) - set( A2X_COMMAND "" ) - endif() - endif() - endif() -endif() - -# If we've found a command that works, check the version -if( A2X_COMMAND ) - string(REGEX REPLACE ".*a2x[^0-9.]*\([0-9.]+\).*" "\\1" A2X_VERSION "${_OUT}") -endif() - -# Generate the *_FOUND as necessary, etc. -include( FindPackageHandleStandardArgs ) -find_package_handle_standard_args( - A2X - REQUIRED_VARS A2X_COMMAND - VERSION_VAR A2X_VERSION ) diff --git a/CMake/FindCairo.cmake b/CMake/FindCairo.cmake deleted file mode 100644 index 10ab8fb0..00000000 --- a/CMake/FindCairo.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Try to find the cairo library -# Once done this will define -# -# CAIRO_FOUND - system has cairo -# CAIRO_INCLUDE_DIRS - the cairo include directory -# CAIRO_LIBRARIES - Link these to use cairo -# -# Define CAIRO_MIN_VERSION for which version desired. -# - -find_package(PkgConfig) - -if(Cairo_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else(Cairo_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "") -endif(Cairo_FIND_REQUIRED) - -if(CAIRO_MIN_VERSION) - pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo>=${CAIRO_MIN_VERSION}) -else(CAIRO_MIN_VERSION) - pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo) -endif(CAIRO_MIN_VERSION) - -if(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) - find_path(CAIRO_INCLUDE_DIRS cairo.h) - find_library(CAIRO_LIBRARIES cairo) -else(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) - # Make paths absolute https://stackoverflow.com/a/35476270 - # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path - set(CAIRO_LIBS_ABSOLUTE) - foreach(lib ${CAIRO_LIBRARIES}) - set(var_name CAIRO_${lib}_ABS) - find_library(${var_name} ${lib} ${CAIRO_LIBRARY_DIRS}) - list(APPEND CAIRO_LIBS_ABSOLUTE ${${var_name}}) - endforeach() - set(CAIRO_LIBRARIES ${CAIRO_LIBS_ABSOLUTE}) -endif(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CAIRO DEFAULT_MSG CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS) -mark_as_advanced(CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS) diff --git a/CMake/FindDBus.cmake b/CMake/FindDBus.cmake deleted file mode 100644 index 4a1a1805..00000000 --- a/CMake/FindDBus.cmake +++ /dev/null @@ -1,59 +0,0 @@ -# - Try to find DBus -# Once done, this will define -# -# DBUS_FOUND - system has DBus -# DBUS_INCLUDE_DIRS - the DBus include directories -# DBUS_LIBRARIES - link these to use DBus -# -# Copyright (C) 2012 Raphael Kubo da Costa -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1) - -FIND_LIBRARY(DBUS_LIBRARIES - NAMES dbus-1 - HINTS ${PC_DBUS_LIBDIR} - ${PC_DBUS_LIBRARY_DIRS} -) - -FIND_PATH(DBUS_INCLUDE_DIR - NAMES dbus/dbus.h - HINTS ${PC_DBUS_INCLUDEDIR} - ${PC_DBUS_INCLUDE_DIRS} -) - -GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH) -FIND_PATH(DBUS_ARCH_INCLUDE_DIR - NAMES dbus/dbus-arch-deps.h - HINTS ${PC_DBUS_INCLUDEDIR} - ${PC_DBUS_INCLUDE_DIRS} - ${_DBUS_LIBRARY_DIR} - ${DBUS_INCLUDE_DIR} - PATH_SUFFIXES include -) - -SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) diff --git a/CMake/FindEpollShim.cmake b/CMake/FindEpollShim.cmake deleted file mode 100644 index b6bed142..00000000 --- a/CMake/FindEpollShim.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# - Find EpollShim -# Once done, this will define -# -# EPOLLSHIM_FOUND - System has EpollShim -# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories -# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim - -find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim) -find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib) - -if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) - set(EPOLLSHIM_FOUND TRUE) -endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS) -mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES) diff --git a/CMake/FindGdkPixbuf.cmake b/CMake/FindGdkPixbuf.cmake deleted file mode 100644 index 9cad4f92..00000000 --- a/CMake/FindGdkPixbuf.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# - Try to find the gdk-pixbuf-2.0 library -# Once done this will define -# -# GDK_PIXBUF_FOUND - system has gdk-pixbuf-2.0 -# GDK_PIXBUF_INCLUDE_DIRS - the gdk-pixbuf-2.0 include directory -# GDK_PIXBUF_LIBRARIES - Link these to use gdk-pixbuf-2.0 -# -# Define GDK_PIXBUF_MIN_VERSION for which version desired. -# - -find_package(PkgConfig) - -if(GdkPixbuf_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else(GdkPixbuf_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "") -endif(GdkPixbuf_FIND_REQUIRED) - -if(GDK_PIXBUF_MIN_VERSION) - pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0>=${GDK_PIXBUF_MIN_VERSION}") -else(GDK_PIXBUF_MIN_VERSION) - pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0") -endif(GDK_PIXBUF_MIN_VERSION) - -if(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) - find_path(GDK_PIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h) - find_library(GDK_PIXBUF_LIBRARIES gdk_pixbuf-2.0) -else(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) - SET(GdkPixbuf_FOUND 1) - # Make paths absolute https://stackoverflow.com/a/35476270 - # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path - set(GDK_PIXBUF_LIBS_ABSOLUTE) - foreach(lib ${GDK_PIXBUF_LIBRARIES}) - set(var_name GDK_PIXBUF_${lib}_ABS) - find_library(${var_name} ${lib} ${GDK_PIXBUF_LIBRARY_DIRS}) - list(APPEND GDK_PIXBUF_LIBS_ABSOLUTE ${${var_name}}) - endforeach() - set(GDK_PIXBUF_LIBRARIES ${GDK_PIXBUF_LIBS_ABSOLUTE}) -endif(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(GDK_PIXBUF DEFAULT_MSG GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) -mark_as_advanced(GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS) diff --git a/CMake/FindJsonC.cmake b/CMake/FindJsonC.cmake deleted file mode 100644 index bbf6930c..00000000 --- a/CMake/FindJsonC.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# - Find json-c -# Find the json-c libraries -# -# This module defines the following variables: -# JSONC_FOUND - True if JSONC is found -# JSONC_LIBRARIES - JSONC libraries -# JSONC_INCLUDE_DIRS - JSONC include directories -# - -find_package(PkgConfig) - -if (JsonC_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else() - set(_pkgconfig_REQUIRED "") -endif() - -if(JsonC_FIND_VERSION) - pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c=${JsonC_FIND_VERSION}) -else() - pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c) -endif() - -find_path(JSONC_INCLUDE_DIRS NAMES json-c/json.h HINTS ${PC_JSONC_INCLUDE_DIRS}) -find_library(JSONC_LIBRARIES NAMES json-c HINTS ${PC_JSONC_LIBRARY_DIRS}) -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(JSONC DEFAULT_MSG JSONC_LIBRARIES JSONC_INCLUDE_DIRS) -mark_as_advanced(JSONC_LIBRARIES JSONC_INCLUDE_DIRS) diff --git a/CMake/FindLibInput.cmake b/CMake/FindLibInput.cmake deleted file mode 100644 index 87721998..00000000 --- a/CMake/FindLibInput.cmake +++ /dev/null @@ -1,66 +0,0 @@ -#.rst: -# FindLibInput -# ------- -# -# Find LibInput library -# -# Try to find LibInpu library. The following values are defined -# -# :: -# -# LIBINPUT_FOUND - True if libinput is available -# LIBINPUT_INCLUDE_DIRS - Include directories for libinput -# LIBINPUT_LIBRARIES - List of libraries for libinput -# LIBINPUT_DEFINITIONS - List of definitions for libinput -# -# and also the following more fine grained variables -# -# :: -# -# LIBINPUT_VERSION -# LIBINPUT_VERSION_MAJOR -# LIBINPUT_VERSION_MINOR -# LIBINPUT_VERSION_MICRO -# -#============================================================================= -# Copyright (c) 2015 Jari Vetoniemi -# -# Distributed under the OSI-approved BSD License (the "License"); -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -include(FeatureSummary) -set_package_properties(LibInput PROPERTIES - URL "http://freedesktop.org/wiki/Software/libinput/" - DESCRIPTION "Library to handle input devices") - -find_package(PkgConfig) -pkg_check_modules(PC_INPUT QUIET libinput) -find_library(LIBINPUT_LIBRARIES NAMES input HINTS ${PC_INPUT_LIBRARY_DIRS}) -find_path(LIBINPUT_INCLUDE_DIRS libinput.h HINTS ${PC_INPUT_INCLUDE_DIRS}) - -set(LIBINPUT_VERSION ${PC_INPUT_VERSION}) -string(REPLACE "." ";" VERSION_LIST "${PC_INPUT_VERSION}") - -LIST(LENGTH VERSION_LIST n) -if (n EQUAL 3) - list(GET VERSION_LIST 0 LIBINPUT_VERSION_MAJOR) - list(GET VERSION_LIST 1 LIBINPUT_VERSION_MINOR) - list(GET VERSION_LIST 2 LIBINPUT_VERSION_MICRO) -endif () - -# This is compatible with libinput-version.h that exists in upstream -# but isn't in distribution (probably forgotten) -set(LIBINPUT_DEFINITIONS ${PC_INPUT_CFLAGS_OTHER} - -DLIBINPUT_VERSION=\"${LIBINPUT_VERSION}\" - -DLIBINPUT_VERSION_MAJOR=${LIBINPUT_VERSION_MAJOR} - -DLIBINPUT_VERSION_MINOR=${LIBINPUT_VERSION_MINOR} - -DLIBINPUT_VERSION_MICRO=${LIBINPUT_VERSION_MICRO}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBINPUT DEFAULT_MSG LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES) -mark_as_advanced(LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES LIBINPUT_DEFINITIONS - LIBINPUT_VERSION LIBINPUT_VERSION_MAJOR LIBINPUT_VERSION_MICRO LIBINPUT_VERSION_MINOR) diff --git a/CMake/FindLibcap.cmake b/CMake/FindLibcap.cmake deleted file mode 100644 index b34e5e37..00000000 --- a/CMake/FindLibcap.cmake +++ /dev/null @@ -1,56 +0,0 @@ -#.rst: -# FindLibcap -# ------- -# -# Find Libcap library -# -# Try to find Libcap library. The following values are defined -# -# :: -# -# Libcap_FOUND - True if Libcap is available -# Libcap_INCLUDE_DIRS - Include directories for Libcap -# Libcap_LIBRARIES - List of libraries for Libcap -# Libcap_DEFINITIONS - List of definitions for Libcap -# -# and also the following more fine grained variables -# -# :: -# -# Libcap_VERSION -# Libcap_VERSION_MAJOR -# Libcap_VERSION_MINOR -# -#============================================================================= -# Copyright (c) 2017 Jerzi Kaminsky -# -# Distributed under the OSI-approved BSD License (the "License"); -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -include(FeatureSummary) -set_package_properties(Libcap PROPERTIES - URL "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2" - DESCRIPTION "Library for getting and setting POSIX.1e capabilities") - -find_package(PkgConfig) -pkg_check_modules(PC_CAP QUIET Libcap) -find_library(Libcap_LIBRARIES NAMES cap HINTS ${PC_CAP_LIBRARY_DIRS}) -find_path(Libcap_INCLUDE_DIRS sys/capability.h HINTS ${PC_CAP_INCLUDE_DIRS}) - -set(Libcap_VERSION ${PC_CAP_VERSION}) -string(REPLACE "." ";" VERSION_LIST "${PC_CAP_VERSION}") - -LIST(LENGTH VERSION_LIST n) -if (n EQUAL 2) - list(GET VERSION_LIST 0 Libcap_VERSION_MAJOR) - list(GET VERSION_LIST 1 Libcap_VERSION_MINOR) -endif () - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES) -mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS - Libcap_VERSION Libcap_VERSION_MAJOR Libcap_VERSION_MICRO Libcap_VERSION_MINOR) diff --git a/CMake/FindPAM.cmake b/CMake/FindPAM.cmake deleted file mode 100644 index 7e6e333a..00000000 --- a/CMake/FindPAM.cmake +++ /dev/null @@ -1,245 +0,0 @@ -# - Try to find the PAM libraries -# Once done this will define -# -# PAM_FOUND - system has pam -# PAM_INCLUDE_DIR - the pam include directory -# PAM_LIBRARIES - libpam library - -if (PAM_INCLUDE_DIR AND PAM_LIBRARY) - set(PAM_FIND_QUIETLY TRUE) -endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) - -find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h pam/pam_appl.h) -find_library(PAM_LIBRARY pam) -find_library(DL_LIBRARY dl) - -if (PAM_INCLUDE_DIR AND PAM_LIBRARY) - set(PAM_FOUND TRUE) - if (DL_LIBRARY) - set(PAM_LIBRARIES ${PAM_LIBRARY} ${DL_LIBRARY}) - else (DL_LIBRARY) - set(PAM_LIBRARIES ${PAM_LIBRARY}) - endif (DL_LIBRARY) - - if (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h) - set(HAVE_PAM_PAM_APPL_H 1) - endif (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h) -endif (PAM_INCLUDE_DIR AND PAM_LIBRARY) - -if (PAM_FOUND) - if (NOT PAM_FIND_QUIETLY) - message(STATUS "Found PAM: ${PAM_LIBRARIES}") - endif (NOT PAM_FIND_QUIETLY) -else (PAM_FOUND) - if (PAM_FIND_REQUIRED) - message(FATAL_ERROR "PAM was not found") - endif(PAM_FIND_REQUIRED) -endif (PAM_FOUND) - -mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY DL_LIBRARY) - -# This file taken from https://github.com/FreeRDP/FreeRDP -# -# -# -# Apache License -# Version 2.0, January 2004 -# http://www.apache.org/licenses/ -# -# TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -# -# 1. Definitions. -# -# "License" shall mean the terms and conditions for use, reproduction, -# and distribution as defined by Sections 1 through 9 of this document. -# -# "Licensor" shall mean the copyright owner or entity authorized by -# the copyright owner that is granting the License. -# -# "Legal Entity" shall mean the union of the acting entity and all -# other entities that control, are controlled by, or are under common -# control with that entity. For the purposes of this definition, -# "control" means (i) the power, direct or indirect, to cause the -# direction or management of such entity, whether by contract or -# otherwise, or (ii) ownership of fifty percent (50%) or more of the -# outstanding shares, or (iii) beneficial ownership of such entity. -# -# "You" (or "Your") shall mean an individual or Legal Entity -# exercising permissions granted by this License. -# -# "Source" form shall mean the preferred form for making modifications, -# including but not limited to software source code, documentation -# source, and configuration files. -# -# "Object" form shall mean any form resulting from mechanical -# transformation or translation of a Source form, including but -# not limited to compiled object code, generated documentation, -# and conversions to other media types. -# -# "Work" shall mean the work of authorship, whether in Source or -# Object form, made available under the License, as indicated by a -# copyright notice that is included in or attached to the work -# (an example is provided in the Appendix below). -# -# "Derivative Works" shall mean any work, whether in Source or Object -# form, that is based on (or derived from) the Work and for which the -# editorial revisions, annotations, elaborations, or other modifications -# represent, as a whole, an original work of authorship. For the purposes -# of this License, Derivative Works shall not include works that remain -# separable from, or merely link (or bind by name) to the interfaces of, -# the Work and Derivative Works thereof. -# -# "Contribution" shall mean any work of authorship, including -# the original version of the Work and any modifications or additions -# to that Work or Derivative Works thereof, that is intentionally -# submitted to Licensor for inclusion in the Work by the copyright owner -# or by an individual or Legal Entity authorized to submit on behalf of -# the copyright owner. For the purposes of this definition, "submitted" -# means any form of electronic, verbal, or written communication sent -# to the Licensor or its representatives, including but not limited to -# communication on electronic mailing lists, source code control systems, -# and issue tracking systems that are managed by, or on behalf of, the -# Licensor for the purpose of discussing and improving the Work, but -# excluding communication that is conspicuously marked or otherwise -# designated in writing by the copyright owner as "Not a Contribution." -# -# "Contributor" shall mean Licensor and any individual or Legal Entity -# on behalf of whom a Contribution has been received by Licensor and -# subsequently incorporated within the Work. -# -# 2. Grant of Copyright License. Subject to the terms and conditions of -# this License, each Contributor hereby grants to You a perpetual, -# worldwide, non-exclusive, no-charge, royalty-free, irrevocable -# copyright license to reproduce, prepare Derivative Works of, -# publicly display, publicly perform, sublicense, and distribute the -# Work and such Derivative Works in Source or Object form. -# -# 3. Grant of Patent License. Subject to the terms and conditions of -# this License, each Contributor hereby grants to You a perpetual, -# worldwide, non-exclusive, no-charge, royalty-free, irrevocable -# (except as stated in this section) patent license to make, have made, -# use, offer to sell, sell, import, and otherwise transfer the Work, -# where such license applies only to those patent claims licensable -# by such Contributor that are necessarily infringed by their -# Contribution(s) alone or by combination of their Contribution(s) -# with the Work to which such Contribution(s) was submitted. If You -# institute patent litigation against any entity (including a -# cross-claim or counterclaim in a lawsuit) alleging that the Work -# or a Contribution incorporated within the Work constitutes direct -# or contributory patent infringement, then any patent licenses -# granted to You under this License for that Work shall terminate -# as of the date such litigation is filed. -# -# 4. Redistribution. You may reproduce and distribute copies of the -# Work or Derivative Works thereof in any medium, with or without -# modifications, and in Source or Object form, provided that You -# meet the following conditions: -# -# (a) You must give any other recipients of the Work or -# Derivative Works a copy of this License; and -# -# (b) You must cause any modified files to carry prominent notices -# stating that You changed the files; and -# -# (c) You must retain, in the Source form of any Derivative Works -# that You distribute, all copyright, patent, trademark, and -# attribution notices from the Source form of the Work, -# excluding those notices that do not pertain to any part of -# the Derivative Works; and -# -# (d) If the Work includes a "NOTICE" text file as part of its -# distribution, then any Derivative Works that You distribute must -# include a readable copy of the attribution notices contained -# within such NOTICE file, excluding those notices that do not -# pertain to any part of the Derivative Works, in at least one -# of the following places: within a NOTICE text file distributed -# as part of the Derivative Works; within the Source form or -# documentation, if provided along with the Derivative Works; or, -# within a display generated by the Derivative Works, if and -# wherever such third-party notices normally appear. The contents -# of the NOTICE file are for informational purposes only and -# do not modify the License. You may add Your own attribution -# notices within Derivative Works that You distribute, alongside -# or as an addendum to the NOTICE text from the Work, provided -# that such additional attribution notices cannot be construed -# as modifying the License. -# -# You may add Your own copyright statement to Your modifications and -# may provide additional or different license terms and conditions -# for use, reproduction, or distribution of Your modifications, or -# for any such Derivative Works as a whole, provided Your use, -# reproduction, and distribution of the Work otherwise complies with -# the conditions stated in this License. -# -# 5. Submission of Contributions. Unless You explicitly state otherwise, -# any Contribution intentionally submitted for inclusion in the Work -# by You to the Licensor shall be under the terms and conditions of -# this License, without any additional terms or conditions. -# Notwithstanding the above, nothing herein shall supersede or modify -# the terms of any separate license agreement you may have executed -# with Licensor regarding such Contributions. -# -# 6. Trademarks. This License does not grant permission to use the trade -# names, trademarks, service marks, or product names of the Licensor, -# except as required for reasonable and customary use in describing the -# origin of the Work and reproducing the content of the NOTICE file. -# -# 7. Disclaimer of Warranty. Unless required by applicable law or -# agreed to in writing, Licensor provides the Work (and each -# Contributor provides its Contributions) on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied, including, without limitation, any warranties or conditions -# of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A -# PARTICULAR PURPOSE. You are solely responsible for determining the -# appropriateness of using or redistributing the Work and assume any -# risks associated with Your exercise of permissions under this License. -# -# 8. Limitation of Liability. In no event and under no legal theory, -# whether in tort (including negligence), contract, or otherwise, -# unless required by applicable law (such as deliberate and grossly -# negligent acts) or agreed to in writing, shall any Contributor be -# liable to You for damages, including any direct, indirect, special, -# incidental, or consequential damages of any character arising as a -# result of this License or out of the use or inability to use the -# Work (including but not limited to damages for loss of goodwill, -# work stoppage, computer failure or malfunction, or any and all -# other commercial damages or losses), even if such Contributor -# has been advised of the possibility of such damages. -# -# 9. Accepting Warranty or Additional Liability. While redistributing -# the Work or Derivative Works thereof, You may choose to offer, -# and charge a fee for, acceptance of support, warranty, indemnity, -# or other liability obligations and/or rights consistent with this -# License. However, in accepting such obligations, You may act only -# on Your own behalf and on Your sole responsibility, not on behalf -# of any other Contributor, and only if You agree to indemnify, -# defend, and hold each Contributor harmless for any liability -# incurred by, or claims asserted against, such Contributor by reason -# of your accepting any such warranty or additional liability. -# -# END OF TERMS AND CONDITIONS -# -# APPENDIX: How to apply the Apache License to your work. -# -# To apply the Apache License to your work, attach the following -# boilerplate notice, with the fields enclosed by brackets "[]" -# replaced with your own identifying information. (Don't include -# the brackets!) The text should be enclosed in the appropriate -# comment syntax for the file format. We also recommend that a -# file or class name and description of purpose be included on the -# same "printed page" as the copyright notice for easier -# identification within third-party archives. -# -# Copyright [yyyy] [name of copyright owner] -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/CMake/FindPCRE.cmake b/CMake/FindPCRE.cmake deleted file mode 100644 index dbbd60ad..00000000 --- a/CMake/FindPCRE.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2007-2009 LuaDist. -# Created by Peter Kapec -# Redistribution and use of this file is allowed according to the terms of the MIT license. -# For details see the COPYRIGHT file distributed with LuaDist. -# Note: -# Searching headers and libraries is very simple and is NOT as powerful as scripts -# distributed with CMake, because LuaDist defines directories to search for. -# Everyone is encouraged to contact the author with improvements. Maybe this file -# becomes part of CMake distribution sometimes. - -# - Find pcre -# Find the native PCRE headers and libraries. -# -# PCRE_INCLUDE_DIRS - where to find pcre.h, etc. -# PCRE_LIBRARIES - List of libraries when using pcre. -# PCRE_FOUND - True if pcre found. - -# Look for the header file. -FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h) - -# Look for the library. -FIND_LIBRARY(PCRE_LIBRARY NAMES pcre) - -# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR) - -# Copy the results to the output variables. -IF(PCRE_FOUND) - SET(PCRE_LIBRARIES ${PCRE_LIBRARY}) - SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) -ELSE(PCRE_FOUND) - SET(PCRE_LIBRARIES) - SET(PCRE_INCLUDE_DIRS) -ENDIF(PCRE_FOUND) - -MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES) diff --git a/CMake/FindPango.cmake b/CMake/FindPango.cmake deleted file mode 100644 index eb296d75..00000000 --- a/CMake/FindPango.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Try to find the pango library -# Once done this will define -# -# PANGO_FOUND - system has pango -# PANGO_INCLUDE_DIRS - the pango include directory -# PANGO_LIBRARIES - Link these to use pango -# -# Define PANGO_MIN_VERSION for which version desired. -# - -find_package(PkgConfig) - -if(Pango_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "REQUIRED") -else(Pango_FIND_REQUIRED) - set(_pkgconfig_REQUIRED "") -endif(Pango_FIND_REQUIRED) - -if(PANGO_MIN_VERSION) - pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION}" "pangocairo>=${PANGO_MIN_VERSION}") -else(PANGO_MIN_VERSION) - pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} pango pangocairo) -endif(PANGO_MIN_VERSION) - -if(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) - find_path(PANGO_INCLUDE_DIRS pango.h) - find_library(PANGO_LIBRARIES pango pangocairo) -else(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) - # Make paths absolute https://stackoverflow.com/a/35476270 - # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path - set(PANGO_LIBS_ABSOLUTE) - foreach(lib ${PANGO_LIBRARIES}) - set(var_name PANGO_${lib}_ABS) - find_library(${var_name} ${lib} ${PANGO_LIBRARY_DIRS}) - list(APPEND PANGO_LIBS_ABSOLUTE ${${var_name}}) - endforeach() - set(PANGO_LIBRARIES ${PANGO_LIBS_ABSOLUTE}) -endif(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PANGO DEFAULT_MSG PANGO_LIBRARIES PANGO_INCLUDE_DIRS) -mark_as_advanced(PANGO_LIBRARIES PANGO_INCLUDE_DIRS) diff --git a/CMake/FindWLC.cmake b/CMake/FindWLC.cmake deleted file mode 100644 index 15b26ce7..00000000 --- a/CMake/FindWLC.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - Find wlc -# Find the wlc libraries -# -# This module defines the following variables: -# WLC_FOUND - True if wlc is found -# WLC_LIBRARIES - wlc libraries -# WLC_INCLUDE_DIRS - wlc include directories -# WLC_DEFINITIONS - Compiler switches required for using wlc -# - -find_package(PkgConfig) -pkg_check_modules(PC_WLC QUIET wlc) -find_path(WLC_INCLUDE_DIRS NAMES wlc/wlc.h HINTS ${PC_WLC_INCLUDE_DIRS}) -find_library(WLC_LIBRARIES NAMES wlc HINTS ${PC_WLC_LIBRARY_DIRS}) - -set(WLC_DEFINITIONS ${PC_WLC_CFLAGS_OTHER}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(wlc DEFAULT_MSG WLC_LIBRARIES WLC_INCLUDE_DIRS) -mark_as_advanced(WLC_LIBRARIES WLC_INCLUDE_DIRS) diff --git a/CMake/FindWayland.cmake b/CMake/FindWayland.cmake deleted file mode 100644 index 69130fe0..00000000 --- a/CMake/FindWayland.cmake +++ /dev/null @@ -1,67 +0,0 @@ -# Try to find Wayland on a Unix system -# -# This will define: -# -# WAYLAND_FOUND - True if Wayland is found -# WAYLAND_LIBRARIES - Link these to use Wayland -# WAYLAND_INCLUDE_DIR - Include directory for Wayland -# WAYLAND_DEFINITIONS - Compiler flags for using Wayland -# -# In addition the following more fine grained variables will be defined: -# -# WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES -# WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES -# WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES -# WAYLAND_CURSOR_FOUND WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES -# -# Copyright (c) 2013 Martin Gräßlin -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -IF (NOT WIN32) - IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES) - # In the cache already - SET(WAYLAND_FIND_QUIETLY TRUE) - ENDIF () - - # Use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor) - - SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS}) - - FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) - FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) - FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) - FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) - - FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) - FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) - FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) - FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) - - set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR}) - - set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES}) - - list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR) - - include(FindPackageHandleStandardArgs) - - FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR) - - MARK_AS_ADVANCED( - WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES - WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES - WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES - WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES - WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES - ) - -ENDIF () diff --git a/CMake/FindWlroots.cmake b/CMake/FindWlroots.cmake deleted file mode 100644 index 0e349d3a..00000000 --- a/CMake/FindWlroots.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - Find wlroots -# Find the wlroots libraries -# -# This module defines the following variables: -# WLR_FOUND - True if wlroots is found -# WLR_LIBRARIES - wlroots libraries -# WLR_INCLUDE_DIRS - wlroots include directories -# WLR_DEFINITIONS - Compiler switches required for using wlroots -# - -find_package(PkgConfig) -pkg_check_modules(PC_WLR QUIET wlroots) -find_path(WLR_INCLUDE_DIRS NAMES wlr/config.h HINTS ${PC_WLR_INCLUDE_DIRS}) -find_library(WLR_LIBRARIES NAMES wlroots HINTS ${PC_WLR_LIBRARY_DIRS}) - -set(WLR_DEFINITIONS ${PC_WLR_CFLAGS_OTHER}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(wlr DEFAULT_MSG WLR_LIBRARIES WLR_INCLUDE_DIRS) -mark_as_advanced(WLR_LIBRARIES WLR_INCLUDE_DIRS) diff --git a/CMake/FindXKBCommon.cmake b/CMake/FindXKBCommon.cmake deleted file mode 100644 index 30ac503a..00000000 --- a/CMake/FindXKBCommon.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# - Find XKBCommon -# Once done, this will define -# -# XKBCOMMON_FOUND - System has XKBCommon -# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories -# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon -# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon - -find_package(PkgConfig) -pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon) -find_path(XKBCOMMON_INCLUDE_DIRS NAMES xkbcommon/xkbcommon.h HINTS ${PC_XKBCOMMON_INCLUDE_DIRS}) -find_library(XKBCOMMON_LIBRARIES NAMES xkbcommon HINTS ${PC_XKBCOMMON_LIBRARY_DIRS}) - -set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(XKBCOMMON DEFAULT_MSG XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS) -mark_as_advanced(XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS) - diff --git a/CMake/Manpage.cmake b/CMake/Manpage.cmake deleted file mode 100644 index bbd6f2dc..00000000 --- a/CMake/Manpage.cmake +++ /dev/null @@ -1,33 +0,0 @@ -find_package(A2X) - -if (A2X_FOUND) - add_custom_target(man ALL) - - function(add_manpage name section) - add_custom_command( - OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} - COMMAND ${A2X_COMMAND} - --no-xmllint - --doctype manpage - --format manpage - -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt - COMMENT Generating manpage for ${name}.${section} - ) - - add_custom_target(man-${name}.${section} - DEPENDS - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} - ) - add_dependencies(man - man-${name}.${section} - ) - - install( - FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} - DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man${section} - COMPONENT documentation - ) - endfunction() -endif() diff --git a/CMake/Wayland.cmake b/CMake/Wayland.cmake deleted file mode 100644 index f9349667..00000000 --- a/CMake/Wayland.cmake +++ /dev/null @@ -1,77 +0,0 @@ -#============================================================================= -# Copyright (C) 2012-2013 Pier Luigi Fiorini -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the name of Pier Luigi Fiorini nor the names of his -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - -find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) - -# wayland_add_protocol_client(outfiles inputfile basename) -function(WAYLAND_ADD_PROTOCOL_CLIENT _sources _protocol _basename) - if(NOT WAYLAND_SCANNER_EXECUTABLE) - message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.") - endif() - - get_filename_component(_infile ${_protocol} ABSOLUTE) - set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.h") - set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.c") - - add_custom_command(OUTPUT "${_client_header}" - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${_infile} > ${_client_header} - DEPENDS ${_infile} VERBATIM) - - add_custom_command(OUTPUT "${_code}" - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code} - DEPENDS ${_infile} VERBATIM) - - list(APPEND ${_sources} "${_client_header}" "${_code}") - set(${_sources} ${${_sources}} PARENT_SCOPE) -endfunction() - -# wayland_add_protocol_server(outfiles inputfile basename) -function(WAYLAND_ADD_PROTOCOL_SERVER _sources _protocol _basename) - if(NOT WAYLAND_SCANNER_EXECUTABLE) - message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.") - endif() - - get_filename_component(_infile ${_protocol} ABSOLUTE) - set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.h") - set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.c") - - add_custom_command(OUTPUT "${_server_header}" - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header < ${_infile} > ${_server_header} - DEPENDS ${_infile} VERBATIM) - - add_custom_command(OUTPUT "${_code}" - COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code} - DEPENDS ${_infile} VERBATIM) - - list(APPEND ${_sources} "${_server_header}" "${_code}") - set(${_sources} ${${_sources}} PARENT_SCOPE) -endfunction() diff --git a/README.md b/README.md index 215cee4f..cfe51346 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ channel or shoot an email to sir@cmpwn.com for advice. Install dependencies: -* cmake +* meson * [wlroots](https://github.com/swaywm/wlroots) * wayland * xwayland @@ -78,11 +78,9 @@ _\*\*\*Only required for tray support_ Run these commands: - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. - make - sudo make install + meson build + ninja -C build + sudo ninja -C build install On systems with logind, you need to set a few caps on the binary: diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt deleted file mode 100644 index 8d8e58ad..00000000 --- a/protocols/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -include(Wayland) - -WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-xdg-shell - xdg-shell.xml - xdg-shell -) -WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-desktop-shell - desktop-shell.xml - desktop-shell -) -WAYLAND_ADD_PROTOCOL_SERVER(proto-server-desktop-shell - desktop-shell.xml - desktop-shell -) - -WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-swaylock - swaylock.xml - swaylock -) -WAYLAND_ADD_PROTOCOL_SERVER(proto-server-swaylock - swaylock.xml - swaylock -) - -WAYLAND_ADD_PROTOCOL_SERVER(proto-server-gamma-control - gamma-control.xml - gamma-control -) - -WAYLAND_ADD_PROTOCOL_SERVER(proto-server-server-decoration - server-decoration.xml - server-decoration -) - -add_library(sway-protocols STATIC - ${proto-client-xdg-shell} - ${proto-client-desktop-shell} - ${proto-server-desktop-shell} - ${proto-client-swaylock} - ${proto-server-swaylock} - ${proto-server-gamma-control} - ${proto-server-server-decoration} - ) - -set(PROTOCOLS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/protocols PARENT_SCOPE) -INCLUDE_DIRECTORIES(${WAYLAND_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIRS}) diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt deleted file mode 100644 index 48ededdd..00000000 --- a/swaybar/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} - ${CAIRO_INCLUDE_DIRS} - ${PANGO_INCLUDE_DIRS} - ${JSONC_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} - ${DBUS_INCLUDE_DIRS} -) -if (ENABLE_TRAY) - file(GLOB tray - tray/*.c - ) -endif() - -add_executable(swaybar - main.c - config.c - render.c - bar.c - status_line.c - ipc.c - event_loop.c - ${tray} -) - -target_link_libraries(swaybar - sway-common - sway-wayland - ${WAYLAND_CLIENT_LIBRARIES} - ${WAYLAND_CURSOR_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PANGO_LIBRARIES} - ${JSONC_LIBRARIES} - ${DBUS_LIBRARIES} -) - -if (WITH_GDK_PIXBUF) - include_directories( - ${GDK_PIXBUF_INCLUDE_DIRS} - ) -endif() - -target_link_libraries(swaybar rt) - -install( - TARGETS swaybar - RUNTIME - DESTINATION bin - COMPONENT runtime -) diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt deleted file mode 100644 index f8cad404..00000000 --- a/swaybg/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} - ${CAIRO_INCLUDE_DIRS} - ${PANGO_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} -) - -add_executable(swaybg - main.c -) - -target_link_libraries(swaybg - sway-common - sway-wayland - ${WAYLAND_CLIENT_LIBRARIES} - ${WAYLAND_CURSOR_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PANGO_LIBRARIES} - m -) - -if (WITH_GDK_PIXBUF) - include_directories( - ${GDK_PIXBUF_INCLUDE_DIRS} - ) - target_link_libraries(swaybg - ${GDK_PIXBUF_LIBRARIES} - ) -endif() - -install( - TARGETS swaybg - RUNTIME - DESTINATION bin - COMPONENT runtime -) diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt deleted file mode 100644 index 42806cae..00000000 --- a/swaygrab/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -include_directories( - ${JSONC_INCLUDE_DIRS} - ${WLC_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} -) - -add_executable(swaygrab - main.c - json.c -) - -target_link_libraries(swaygrab - sway-common - ${JSONC_LIBRARIES} - rt - m -) - -install( - TARGETS swaygrab - RUNTIME - DESTINATION bin - COMPONENT runtime -) - -if (A2X_FOUND) - add_manpage(swaygrab 1) -endif() diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt deleted file mode 100644 index 90b54a72..00000000 --- a/swaylock/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} - ${CAIRO_INCLUDE_DIRS} - ${PANGO_INCLUDE_DIRS} - ${PAM_INCLUDE_DIRS} - ${JSONC_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} -) - -add_executable(swaylock - main.c -) - -target_link_libraries(swaylock - sway-common - sway-wayland - ${WAYLAND_CLIENT_LIBRARIES} - ${WAYLAND_CURSOR_LIBRARIES} - ${CAIRO_LIBRARIES} - ${PANGO_LIBRARIES} - ${PAM_LIBRARIES} - ${JSONC_LIBRARIES} - m -) - -if (WITH_GDK_PIXBUF) - include_directories( - ${GDK_PIXBUF_INCLUDE_DIRS} - ) - target_link_libraries(swaylock - ${GDK_PIXBUF_LIBRARIES} - ) -endif() - -install( - TARGETS swaylock - RUNTIME - DESTINATION bin - COMPONENT runtime -) - -install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock - DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/ - COMPONENT data -) - -if (A2X_FOUND) - add_manpage(swaylock 1) -endif() diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt deleted file mode 100644 index 91fd7fff..00000000 --- a/wayland/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -include_directories( - ${PROTOCOLS_INCLUDE_DIRS} - ${PANGO_INCLUDE_DIRS} - ${XKBCOMMON_INCLUDE_DIRS} - ${WAYLAND_INCLUDE_DIR} - ${EPOLLSHIM_INCLUDE_DIRS} -) - -add_library(sway-wayland STATIC - buffers.c - pango.c - registry.c - window.c - cairo.c - ) - -target_link_libraries(sway-wayland - sway-common - sway-protocols - ${PANGO_LIBRARIES} - ${XKBCOMMON_LIBRARIES} - ${EPOLLSHIM_LIBRARIES} - ) - -if (WITH_GDK_PIXBUF) - include_directories( - ${GDK_PIXBUF_INCLUDE_DIRS} - ) - target_link_libraries(sway-wayland - ${GDK_PIXBUF_LIBRARIES} - ) -endif()