Merge pull request #1479 from acrisci/feature/meson-build

meson build
master
Drew DeVault 7 years ago committed by GitHub
commit 1cfebe827a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,7 @@
# vim: ft=yaml ts=2 sw=2 et :
image: archlinux
packages:
- cmake
- meson
- wlc-git
- xorg-server-xwayland
- xcb-util-image
@ -9,25 +9,22 @@ packages:
- pango
- cairo
- wayland
- wayland-protocols
- gdk-pixbuf2
- meson
- libinput
- libxkbcommon
sources:
- https://git.sr.ht/~sircmpwn/sway
- https://git.sr.ht/~sircmpwn/wlroots
tasks:
- wlroots: |
cd wlroots
mkdir build
cd build
meson --prefix=/usr ..
ninja
sudo ninja install
meson --prefix=/usr build
ninja -C build
sudo ninja -C build install
- setup: |
cd sway
mkdir build
cd build
cmake ..
meson build
- build: |
cd sway
cd build
make
ninja -C build

4
.gitignore vendored

@ -1,7 +1,3 @@
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
*.swp
*.o

@ -7,35 +7,29 @@ compiler:
- clang
env:
- BUILD_TYPE=Release
- BUILD_TYPE=Debug
- BUILD_TYPE=ASAN
- BUILD_TYPE=release
- BUILD_TYPE=debug
arch:
packages:
- cmake
- meson
- ninja
- xorg-server-xwayland
- json-c
- wayland
- wayland-protocols
- xcb-util-image
- pango
- cairo
- gdk-pixbuf2
- wlc-git
- libcap
- meson
- libinput
- libxkbcommon
script:
- git clone https://github.com/swaywm/wlroots
- cd wlroots
- mkdir build
- cd build
- meson --prefix=/usr ..
- sudo ninja install
- cd ../..
- cmake .
- make
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .
- make
- 'cd wlroots && meson --prefix=/usr build && ninja -C build && sudo ninja -C build install'
- meson build --buildtype=$BUILD_TYPE
- ninja -C build
script:
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"

@ -1,75 +0,0 @@
#
# (c)2015 KiCad Developers
# (c)2015 Brian Sidebotham <brian.sidebotham@gmail.com>
#
# 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 )

@ -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)

@ -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 <rakuco@webkit.org>
#
# 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)

@ -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)

@ -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)

@ -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)

@ -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)

@ -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)

@ -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.

@ -1,37 +0,0 @@
# Copyright (C) 2007-2009 LuaDist.
# Created by Peter Kapec <kapecp@gmail.com>
# 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)

@ -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)

@ -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)

@ -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 <mgraesslin@kde.org>
#
# 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 ()

@ -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)

@ -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)

@ -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()

@ -1,77 +0,0 @@
#=============================================================================
# Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
# 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()

@ -1,165 +0,0 @@
cmake_minimum_required(VERSION 3.1.0)
project(sway C)
add_compile_options(-g)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror)
# Add Address Sanitiezed build type
set(CMAKE_C_FLAGS_ASAN
"${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer"
CACHE STRING "Flags used by the C compiler during address sanitizer builds."
FORCE )
mark_as_advanced(
CMAKE_C_FLAGS_ASAN
CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG
)
list(INSERT CMAKE_MODULE_PATH 0
${CMAKE_CURRENT_SOURCE_DIR}/CMake
)
if (VERSION)
add_definitions(-DSWAY_VERSION=\"${VERSION}\")
else()
execute_process(
COMMAND git describe --always --tags
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d" UTC)
add_definitions("-DSWAY_VERSION=\"${GIT_COMMIT_HASH} (${CURRENT_DATE}, branch \\\"${GIT_BRANCH}\\\")\"")
endif()
option(enable-swaylock "Enables the swaylock utility" YES)
option(enable-swaybg "Enables the wallpaper utility" YES)
option(enable-swaybar "Enables the swaybar utility" YES)
option(enable-swaygrab "Enables the swaygrab utility" YES)
option(enable-swaymsg "Enables the swaymsg utility" YES)
option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES)
option(enable-tray "Enables the swaybar tray" YES)
option(zsh-completions "Zsh shell completions" NO)
option(default-wallpaper "Installs the default wallpaper" YES)
option(LD_LIBRARY_PATH "Configure sway's default LD_LIBRARY_PATH")
if (LD_LIBRARY_PATH)
add_definitions(-D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}")
endif()
find_package(JsonC 0.12.1 REQUIRED)
find_package(PCRE REQUIRED)
find_package(Wlroots REQUIRED)
find_package(Wayland REQUIRED)
find_package(XKBCommon REQUIRED)
find_package(Cairo REQUIRED)
find_package(Pango REQUIRED)
find_package(GdkPixbuf)
find_package(PAM)
find_package(DBus 1.10)
find_package(LibInput REQUIRED)
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
find_package(Libcap REQUIRED)
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
find_package(EpollShim REQUIRED)
endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
include(FeatureSummary)
include(Manpage)
include(GNUInstallDirs)
if (enable-gdk-pixbuf)
if (GDK_PIXBUF_FOUND)
set(WITH_GDK_PIXBUF YES)
add_definitions(-DWITH_GDK_PIXBUF)
else()
message(WARNING "gdk-pixbuf required but not found, only png images supported.")
endif()
else()
message(STATUS "Building without gdk-pixbuf, only png images supported.")
endif()
if (enable-tray)
if (DBUS_FOUND)
set(ENABLE_TRAY TRUE)
add_definitions(-DENABLE_TRAY)
else()
message(WARNING "Tray required but DBus was not found. Tray will not be included")
endif()
else()
message(STATUS "Building without the tray.")
endif()
include_directories(include)
add_subdirectory(protocols)
add_subdirectory(common)
add_subdirectory(wayland)
add_subdirectory(sway)
if(enable-swaybg)
if(CAIRO_FOUND AND PANGO_FOUND)
# TODO WLR
#add_subdirectory(swaybg)
else()
message(WARNING "Not building swaybg - cairo, and pango are required.")
endif()
endif()
if(enable-swaymsg)
add_subdirectory(swaymsg)
endif()
if(enable-swaygrab)
# TODO WLR
#add_subdirectory(swaygrab)
endif()
if(enable-swaybar)
if(CAIRO_FOUND AND PANGO_FOUND)
# TODO WLR
#add_subdirectory(swaybar)
else()
message(WARNING "Not building swaybar - cairo, and pango are required.")
endif()
endif()
if(enable-swaylock)
if(CAIRO_FOUND AND PANGO_FOUND AND PAM_FOUND)
# TODO WLR
#add_subdirectory(swaylock)
else()
message(WARNING "Not building swaylock - cairo, pango, and PAM are required.")
endif()
endif()
if(zsh-completions)
add_subdirectory(completions/zsh)
endif()
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/wayland-sessions
COMPONENT data
)
if(default-wallpaper)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/
DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/backgrounds/sway
COMPONENT data
FILES_MATCHING PATTERN "*Wallpaper*"
)
endif()
feature_summary(WHAT ALL)

@ -22,14 +22,3 @@ assertion fails.
Outside of the compositor (swaymsg, swaybar, etc), using `assert.h` is
permitted.
## Building against a local wlc
1. Build wlc as described [here](https://github.com/Cloudef/wlc#building)
2. Inside your sway source folder, tell `cmake` to use your local version of wlc:
```bash
cmake \
-DWLC_LIBRARIES=path/to/wlc/target/src/libwlc.so \
-DWLC_INCLUDE_DIRS=path/to/wlc/include .
```

@ -52,7 +52,7 @@ schau im IRC-Channel vorbei oder schreibe eine e-Mail an sir@cmpwn.com (nur engl
Abhängigkeiten:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -74,11 +74,9 @@ _\*\*Nur erforderlich für swaylock_
Führe diese Befehle aus:
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
In Systemen mit logind musst du `sway` einige Capabilities geben:

@ -45,7 +45,7 @@ To username μου στο Freenode είναι kon14 και θα με βρείτ
Εγκατάσταση εξαρτήσεων:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -67,11 +67,9 @@ _\*\*Απαιτείται μόνο για swaylock_
Εκτελέστε αυτές τις εντολές:
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
Σε συστήματα με logind, χρειάζεται να ορίσετε μερικά δικαιώματα caps στο εκτελέσιμο αρχείο:

@ -47,7 +47,7 @@ IRC ou envoyez un e-mail à sir@cmpwn.com (en anglais seulement) pour des consei
Installez les dépendances :
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -69,11 +69,9 @@ _\*\*Uniquement requis pour swaylock_
Exécutez ces commandes :
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
Sur les systèmes avec logind, vous devez définir quelques caps sur le binaire :

@ -48,7 +48,7 @@ a sir@cmpwn.com.
Installa queste dipendenze:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -70,11 +70,9 @@ _\*\*Richiesto solo per swaylock_
Esegui questi comandi:
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
Per i sistemi con logind, devi impostare un paio di caps sull'eseguibile:

@ -38,7 +38,7 @@ Swayは沢山のディストリビューションで提供されています。"
次の依存パッケージをインストールしてください:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -60,11 +60,9 @@ _\*\*swaylockでのみ必要です_
次のコマンドを実行してください:
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
logindを使用しているシステムでは、バイナリにいくつかのケーパビリティを設定する必要があります:

@ -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:

@ -54,7 +54,7 @@ visite o canal no IRC ou mande um email para sir@cmpwn.com (*em inglês*).
Antes de iniciar a compilação, instale as dependências:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -76,11 +76,9 @@ _\*\*Dependência apenas de swaylock_
Para compilar, execute estes comandos:
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
Em sistemas com logind, configure as seguintes capacidades para o arquivo binário:

@ -47,7 +47,7 @@ Sway доступен во многих дистрибутивах и наход
Установите следующие пакеты:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -69,11 +69,9 @@ _\*\*Требуется только для swaylock_
Выполните следующие команды:
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
Если у вас logind:

@ -54,7 +54,7 @@ Sway доступний у багатьох дистрибутивах Linux (а
Встановіть залежності:
* cmake
* meson
* [wlc](https://github.com/Cloudef/wlc)
* wayland
* xwayland
@ -76,11 +76,9 @@ _\*\*Лише для swaylock_
Виконайте ці команди:
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
На системах **з** logind, варто встановити декілька можливостей (caps)
на виконуваний файл sway:

@ -1,15 +0,0 @@
include_directories(
${WLC_INCLUDE_DIRS}
${XKBCOMMON_INCLUDE_DIRS}
)
add_library(sway-common STATIC
ipc-client.c
list.c
log.c
util.c
readline.c
stringop.c
)
target_link_libraries(sway-common m)

@ -0,0 +1,11 @@
lib_sway_common = static_library('sway-common',
files(
'log.c',
'list.c',
'util.c',
'stringop.c',
'readline.c',
'ipc-client.c'
),
include_directories: sway_inc
)

@ -1,4 +0,0 @@
install(
FILES _sway _swaymsg _swaygrab _swaylock
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/zsh/site-functions/
)

@ -21,7 +21,7 @@ set $menu dmenu_run
### Output configuration
#
# Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
output * bg __DATADIR__/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
#
# Example configuration:
#
@ -194,4 +194,4 @@ bar {
}
}
include __SYSCONFDIR__/sway/config.d/*
include @sysconfdir@/sway/config.d/*

@ -0,0 +1,147 @@
project(
'sway',
'c',
license: 'MIT',
default_options: [
'c_std=c11',
'warning_level=2',
'werror=true',
],
)
add_project_arguments('-Wno-unused-parameter', language: 'c')
cc = meson.get_compiler('c')
is_freebsd = host_machine.system().startswith('freebsd')
datadir = get_option('datadir')
sysconfdir = get_option('sysconfdir')
prefix = get_option('prefix')
jsonc = dependency('json-c', version: '>=0.12.1')
pcre = dependency('libpcre')
wlroots = dependency('wlroots')
wayland_server = dependency('wayland-server')
wayland_client = dependency('wayland-client')
wayland_egl = dependency('wayland-egl')
wayland_protos = dependency('wayland-protocols')
xkbcommon = dependency('xkbcommon')
pango = dependency('pango')
pixman = dependency('pixman-1')
libcap = dependency('libcap')
math = cc.find_library('m')
git = find_program('git', required: false)
a2x = find_program('a2x', required: false)
if a2x.found()
mandir = get_option('mandir')
man_files = [
'sway/sway.1.txt',
'sway/sway.5.txt',
'sway/sway-bar.5.txt',
'sway/sway-input.5.txt',
'sway/sway-security.7.txt',
'swaymsg/swaymsg.1.txt',
]
foreach filename : man_files
topic = filename.split('.')[-3].split('/')[-1]
section = filename.split('.')[-2]
custom_target(
'man-@0@-@1@'.format(topic, section),
input: filename,
output: '@BASENAME@',
command: [
a2x,
'--no-xmllint',
'--doctype', 'manpage',
'--format', 'manpage',
'--destination-dir', meson.current_build_dir(),
'@INPUT@'
],
install: true,
install_dir: '@0@/man@1@'.format(mandir, section)
)
endforeach
endif
version = get_option('sway_version')
if version != ''
version = '"@0@"'.format(version)
else
if not git.found()
error('git is required to make the version string')
endif
git_commit_hash = run_command([git.path(), 'describe', '--always', '--tags']).stdout().strip()
git_branch = run_command([git.path(), 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip()
version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch)
endif
add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')
sway_inc = include_directories('include')
subdir('common')
subdir('sway')
subdir('swaymsg')
config = configuration_data()
config.set('sysconfdir', join_paths(prefix, sysconfdir))
config.set('datadir', join_paths(prefix, datadir))
config.set('prefix', prefix)
configure_file(
configuration: config,
input: 'config.in',
output: '@BASENAME@',
install_dir: sysconfdir + '/sway'
)
if is_freebsd
configure_file(
configuration: config,
input: 'security.d/10-freebsd.in',
output: '@BASENAME@',
install_dir: sysconfdir + '/sway/security.d'
)
else
configure_file(
configuration: config,
input: 'security.d/00-defaults.in',
output: '@BASENAME@',
install_dir: sysconfdir + '/sway/security.d'
)
endif
install_data(
'sway.desktop',
install_dir: datadir + '/wayland-sessions'
)
if (get_option('default_wallpaper'))
wallpaper_files = files(
'assets/Sway_Wallpaper_Blue_768x1024.png',
'assets/Sway_Wallpaper_Blue_768x1024_Portrait.png',
'assets/Sway_Wallpaper_Blue_1136x640.png',
'assets/Sway_Wallpaper_Blue_1136x640_Portrait.png',
'assets/Sway_Wallpaper_Blue_1366x768.png',
'assets/Sway_Wallpaper_Blue_1920x1080.png',
'assets/Sway_Wallpaper_Blue_2048x1536.png',
'assets/Sway_Wallpaper_Blue_2048x1536_Portrait.png',
)
wallpaper_install_dir = datadir + '/backgrounds/sway'
install_data(wallpaper_files, install_dir: wallpaper_install_dir)
endif
if (get_option('zsh_completions'))
zsh_files = files(
'completions/zsh/_sway',
'completions/zsh/_swaygrab',
'completions/zsh/_swaylock',
'completions/zsh/_swaymsg',
)
zsh_install_dir = datadir + '/zsh/site-functions'
install_data(zsh_files, install_dir: zsh_install_dir)
endif

@ -0,0 +1,3 @@
option('sway_version', type : 'string', description: 'The version string reported in `sway --version`.')
option('default_wallpaper', type: 'boolean', value: true, description: 'Install the default wallpaper.')
option('zsh_completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')

@ -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})

@ -6,17 +6,17 @@
# installation.
#
# DO NOT CHANGE THIS FILE. Override these defaults by writing new files in
# __SYSCONFDIR__/sway/security.d/*
# @sysconfdir@/sway/security.d/*
# Configures enabled compositor features for specific programs
permit * fullscreen keyboard mouse
permit __PREFIX__/bin/swaylock lock
permit __PREFIX__/bin/swaybg background
permit __PREFIX__/bin/swaygrab screenshot
permit __PREFIX__/bin/swaybar panel
permit @prefix@/bin/swaylock lock
permit @prefix@/bin/swaybg background
permit @prefix@/bin/swaygrab screenshot
permit @prefix@/bin/swaybar panel
# Configures enabled IPC features for specific programs
ipc __PREFIX__/bin/swaymsg {
ipc @prefix@/bin/swaymsg {
* enabled
events {
@ -24,7 +24,7 @@ ipc __PREFIX__/bin/swaymsg {
}
}
ipc __PREFIX__/bin/swaybar {
ipc @prefix@/bin/swaybar {
bar-config enabled
outputs enabled
workspaces enabled
@ -36,12 +36,12 @@ ipc __PREFIX__/bin/swaybar {
}
}
ipc __PREFIX__/bin/swaygrab {
ipc @prefix@/bin/swaygrab {
outputs enabled
tree enabled
}
ipc __PREFIX__/bin/swaylock {
ipc @prefix@/bin/swaylock {
outputs enabled
}

@ -1,96 +0,0 @@
include_directories(
${PROTOCOLS_INCLUDE_DIRS}
${WLR_INCLUDE_DIRS}
${PCRE_INCLUDE_DIRS}
${JSONC_INCLUDE_DIRS}
${XKBCOMMON_INCLUDE_DIRS}
${LIBINPUT_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
${PANGO_INCLUDE_DIRS}
${WAYLAND_INCLUDE_DIR}
)
add_executable(sway
desktop/output.c
desktop/xdg_shell_v6.c
commands.c
commands/exit.c
tree/container.c
tree/layout.c
tree/workspace.c
base64.c
main.c
server.c
ipc-json.c
ipc-server.c
)
add_definitions(
-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}"
)
target_link_libraries(sway
sway-common
sway-protocols
sway-wayland
${WLR_LIBRARIES}
${XKBCOMMON_LIBRARIES}
${PCRE_LIBRARIES}
${JSONC_LIBRARIES}
${WAYLAND_SERVER_LIBRARIES}
${LIBINPUT_LIBRARIES}
${PANGO_LIBRARIES}
${JSONC_LIBRARIES}
m
)
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(sway cap)
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
install(
TARGETS sway
RUNTIME
DESTINATION bin
COMPONENT runtime
)
add_custom_target(configs ALL)
function(add_config name source destination)
add_custom_command(
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
COMMAND sed -r
's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g'
${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in
COMMENT "Generating config file ${source}"
)
install(
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination}
COMPONENT configuration
)
add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name})
add_dependencies(configs config-${name})
endfunction()
add_config(config config sway)
add_config(00-defaults security.d/00-defaults sway/security.d)
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
add_config(10-freebsd security.d/10-freebsd sway/security.d)
endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
if (A2X_FOUND)
add_manpage(sway 1)
add_manpage(sway 5)
add_manpage(sway-input 5)
add_manpage(sway-bar 5)
add_manpage(sway-security 7)
endif()

@ -0,0 +1,31 @@
sway_sources = files(
'main.c',
'server.c',
'commands.c',
'commands/exit.c',
'ipc-json.c',
'ipc-server.c',
'desktop/output.c',
'desktop/xdg_shell_v6.c',
'tree/container.c',
'tree/layout.c',
'tree/workspace.c',
)
sway_deps = [
pixman,
wayland_server,
jsonc,
wlroots,
libcap,
math,
]
executable(
'sway',
sway_sources,
include_directories: [sway_inc],
dependencies: sway_deps,
link_with: [lib_sway_common],
install: true
)

@ -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
)

@ -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
)

@ -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()

@ -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()

@ -1,23 +0,0 @@
add_executable(swaymsg
main.c
)
include_directories(
${JSONC_INCLUDE_DIRS}
)
target_link_libraries(swaymsg
sway-common
${JSONC_LIBRARIES}
)
install(
TARGETS swaymsg
RUNTIME
DESTINATION bin
COMPONENT runtime
)
if (A2X_FOUND)
add_manpage(swaymsg 1)
endif()

@ -0,0 +1,8 @@
executable(
'swaymsg',
'main.c',
include_directories: [sway_inc],
dependencies: [jsonc],
link_with: [lib_sway_common],
install: true
)

@ -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()
Loading…
Cancel
Save