aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-01 05:21:03 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-01 05:21:03 -0500
commitd071ff08aeae2bbea4ac4a8e56c7a146c13d0869 (patch)
treeb1780435422ac6d778fd4b9c0a4746306dee59fe
parentremove relevant CMakeLists.txt (diff)
downloadsway-d071ff08aeae2bbea4ac4a8e56c7a146c13d0869.tar.gz
sway-d071ff08aeae2bbea4ac4a8e56c7a146c13d0869.tar.zst
sway-d071ff08aeae2bbea4ac4a8e56c7a146c13d0869.zip
remove the rest of cmake
-rw-r--r--.gitignore4
-rw-r--r--CMake/FindA2X.cmake75
-rw-r--r--CMake/FindCairo.cmake42
-rw-r--r--CMake/FindDBus.cmake59
-rw-r--r--CMake/FindEpollShim.cmake17
-rw-r--r--CMake/FindGdkPixbuf.cmake43
-rw-r--r--CMake/FindJsonC.cmake29
-rw-r--r--CMake/FindLibInput.cmake66
-rw-r--r--CMake/FindLibcap.cmake56
-rw-r--r--CMake/FindPAM.cmake245
-rw-r--r--CMake/FindPCRE.cmake37
-rw-r--r--CMake/FindPango.cmake42
-rw-r--r--CMake/FindWLC.cmake20
-rw-r--r--CMake/FindWayland.cmake67
-rw-r--r--CMake/FindWlroots.cmake20
-rw-r--r--CMake/FindXKBCommon.cmake19
-rw-r--r--CMake/Manpage.cmake33
-rw-r--r--CMake/Wayland.cmake77
-rw-r--r--README.md10
-rw-r--r--protocols/CMakeLists.txt46
-rw-r--r--swaybar/CMakeLists.txt51
-rw-r--r--swaybg/CMakeLists.txt37
-rw-r--r--swaygrab/CMakeLists.txt28
-rw-r--r--swaylock/CMakeLists.txt51
-rw-r--r--wayland/CMakeLists.txt32
25 files changed, 4 insertions, 1202 deletions
diff --git a/.gitignore b/.gitignore
index 48f8a0cb..b6e56f7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,3 @@
1CMakeCache.txt
2CMakeFiles
3Makefile
4cmake_install.cmake
5install_manifest.txt 1install_manifest.txt
6*.swp 2*.swp
7*.o 3*.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 @@
1#
2# (c)2015 KiCad Developers
3# (c)2015 Brian Sidebotham <brian.sidebotham@gmail.com>
4#
5# CMake module to find a2x (part of the asciidoc toolchain).
6#
7# Variables generated:
8#
9# A2X_FOUND true when A2X_COMMAND is valid
10# A2X_COMMAND The command to run a2x (may be a list including an interpreter)
11# A2X_VERSION The a2x version that has been found
12#
13
14# Have a go at finding a a2x executable
15find_program( A2X_PROGRAM a2x )
16
17# Found something, attempt to try and use it...
18if( A2X_PROGRAM )
19 execute_process(
20 COMMAND ${A2X_PROGRAM} --version
21 OUTPUT_VARIABLE _OUT
22 ERROR_VARIABLE _ERR
23 RESULT_VARIABLE _RES
24 OUTPUT_STRIP_TRAILING_WHITESPACE )
25
26 # If it worked, set the A2X_COMMAND
27 if( _RES MATCHES 0 )
28 set( A2X_COMMAND "${A2X_PROGRAM}" )
29 endif()
30endif()
31
32# If nothing could be found, test to see if we can just find the script file,
33# that we'll then run with the python interpreter
34if( NOT A2X_COMMAND )
35 find_file( A2X_SCRIPT a2x.py )
36
37 if( A2X_SCRIPT )
38 # Find the python interpreter quietly
39 if( NOT PYTHONINTERP_FOUND )
40 find_package( PYTHONINTERP QUIET )
41 endif()
42
43 if( NOT PYTHONINTERP_FOUND )
44 # Python's not available so can't find a2x...
45 set( A2X_COMMAND "" )
46 else()
47 # Build the python based command
48 set( A2X_COMMAND "${PYTHON_EXECUTABLE}" "${A2X_SCRIPT}" )
49
50 execute_process(
51 COMMAND ${A2X_COMMAND} --version
52 OUTPUT_VARIABLE _OUT
53 ERROR_VARIABLE _ERR
54 RESULT_VARIABLE _RES
55 OUTPUT_STRIP_TRAILING_WHITESPACE )
56
57 # If it still can't be run, then give up
58 if( NOT _RES MATCHES 0 )
59 set( A2X_COMMAND "" )
60 endif()
61 endif()
62 endif()
63endif()
64
65# If we've found a command that works, check the version
66if( A2X_COMMAND )
67 string(REGEX REPLACE ".*a2x[^0-9.]*\([0-9.]+\).*" "\\1" A2X_VERSION "${_OUT}")
68endif()
69
70# Generate the *_FOUND as necessary, etc.
71include( FindPackageHandleStandardArgs )
72find_package_handle_standard_args(
73 A2X
74 REQUIRED_VARS A2X_COMMAND
75 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 @@
1# - Try to find the cairo library
2# Once done this will define
3#
4# CAIRO_FOUND - system has cairo
5# CAIRO_INCLUDE_DIRS - the cairo include directory
6# CAIRO_LIBRARIES - Link these to use cairo
7#
8# Define CAIRO_MIN_VERSION for which version desired.
9#
10
11find_package(PkgConfig)
12
13if(Cairo_FIND_REQUIRED)
14 set(_pkgconfig_REQUIRED "REQUIRED")
15else(Cairo_FIND_REQUIRED)
16 set(_pkgconfig_REQUIRED "")
17endif(Cairo_FIND_REQUIRED)
18
19if(CAIRO_MIN_VERSION)
20 pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo>=${CAIRO_MIN_VERSION})
21else(CAIRO_MIN_VERSION)
22 pkg_check_modules(CAIRO ${_pkgconfig_REQUIRED} cairo)
23endif(CAIRO_MIN_VERSION)
24
25if(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
26 find_path(CAIRO_INCLUDE_DIRS cairo.h)
27 find_library(CAIRO_LIBRARIES cairo)
28else(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
29 # Make paths absolute https://stackoverflow.com/a/35476270
30 # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path
31 set(CAIRO_LIBS_ABSOLUTE)
32 foreach(lib ${CAIRO_LIBRARIES})
33 set(var_name CAIRO_${lib}_ABS)
34 find_library(${var_name} ${lib} ${CAIRO_LIBRARY_DIRS})
35 list(APPEND CAIRO_LIBS_ABSOLUTE ${${var_name}})
36 endforeach()
37 set(CAIRO_LIBRARIES ${CAIRO_LIBS_ABSOLUTE})
38endif(NOT CAIRO_FOUND AND NOT PKG_CONFIG_FOUND)
39
40include(FindPackageHandleStandardArgs)
41find_package_handle_standard_args(CAIRO DEFAULT_MSG CAIRO_LIBRARIES CAIRO_INCLUDE_DIRS)
42mark_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 @@
1# - Try to find DBus
2# Once done, this will define
3#
4# DBUS_FOUND - system has DBus
5# DBUS_INCLUDE_DIRS - the DBus include directories
6# DBUS_LIBRARIES - link these to use DBus
7#
8# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
9#
10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions
12# are met:
13# 1. Redistributions of source code must retain the above copyright
14# notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright
16# notice, this list of conditions and the following disclaimer in the
17# documentation and/or other materials provided with the distribution.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
20# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
23# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31FIND_PACKAGE(PkgConfig)
32PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1)
33
34FIND_LIBRARY(DBUS_LIBRARIES
35 NAMES dbus-1
36 HINTS ${PC_DBUS_LIBDIR}
37 ${PC_DBUS_LIBRARY_DIRS}
38)
39
40FIND_PATH(DBUS_INCLUDE_DIR
41 NAMES dbus/dbus.h
42 HINTS ${PC_DBUS_INCLUDEDIR}
43 ${PC_DBUS_INCLUDE_DIRS}
44)
45
46GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH)
47FIND_PATH(DBUS_ARCH_INCLUDE_DIR
48 NAMES dbus/dbus-arch-deps.h
49 HINTS ${PC_DBUS_INCLUDEDIR}
50 ${PC_DBUS_INCLUDE_DIRS}
51 ${_DBUS_LIBRARY_DIR}
52 ${DBUS_INCLUDE_DIR}
53 PATH_SUFFIXES include
54)
55
56SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
57
58INCLUDE(FindPackageHandleStandardArgs)
59FIND_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 @@
1# - Find EpollShim
2# Once done, this will define
3#
4# EPOLLSHIM_FOUND - System has EpollShim
5# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
6# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim
7
8find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
9find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
10
11if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
12 set(EPOLLSHIM_FOUND TRUE)
13endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
14
15include(FindPackageHandleStandardArgs)
16find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
17mark_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 @@
1# - Try to find the gdk-pixbuf-2.0 library
2# Once done this will define
3#
4# GDK_PIXBUF_FOUND - system has gdk-pixbuf-2.0
5# GDK_PIXBUF_INCLUDE_DIRS - the gdk-pixbuf-2.0 include directory
6# GDK_PIXBUF_LIBRARIES - Link these to use gdk-pixbuf-2.0
7#
8# Define GDK_PIXBUF_MIN_VERSION for which version desired.
9#
10
11find_package(PkgConfig)
12
13if(GdkPixbuf_FIND_REQUIRED)
14 set(_pkgconfig_REQUIRED "REQUIRED")
15else(GdkPixbuf_FIND_REQUIRED)
16 set(_pkgconfig_REQUIRED "")
17endif(GdkPixbuf_FIND_REQUIRED)
18
19if(GDK_PIXBUF_MIN_VERSION)
20 pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0>=${GDK_PIXBUF_MIN_VERSION}")
21else(GDK_PIXBUF_MIN_VERSION)
22 pkg_check_modules(GDK_PIXBUF ${_pkgconfig_REQUIRED} "gdk-pixbuf-2.0")
23endif(GDK_PIXBUF_MIN_VERSION)
24
25if(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
26 find_path(GDK_PIXBUF_INCLUDE_DIRS gdk-pixbuf/gdk-pixbuf.h)
27 find_library(GDK_PIXBUF_LIBRARIES gdk_pixbuf-2.0)
28else(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
29 SET(GdkPixbuf_FOUND 1)
30 # Make paths absolute https://stackoverflow.com/a/35476270
31 # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path
32 set(GDK_PIXBUF_LIBS_ABSOLUTE)
33 foreach(lib ${GDK_PIXBUF_LIBRARIES})
34 set(var_name GDK_PIXBUF_${lib}_ABS)
35 find_library(${var_name} ${lib} ${GDK_PIXBUF_LIBRARY_DIRS})
36 list(APPEND GDK_PIXBUF_LIBS_ABSOLUTE ${${var_name}})
37 endforeach()
38 set(GDK_PIXBUF_LIBRARIES ${GDK_PIXBUF_LIBS_ABSOLUTE})
39endif(NOT GDK_PIXBUF_FOUND AND NOT PKG_CONFIG_FOUND)
40
41include(FindPackageHandleStandardArgs)
42find_package_handle_standard_args(GDK_PIXBUF DEFAULT_MSG GDK_PIXBUF_LIBRARIES GDK_PIXBUF_INCLUDE_DIRS)
43mark_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 @@
1# - Find json-c
2# Find the json-c libraries
3#
4# This module defines the following variables:
5# JSONC_FOUND - True if JSONC is found
6# JSONC_LIBRARIES - JSONC libraries
7# JSONC_INCLUDE_DIRS - JSONC include directories
8#
9
10find_package(PkgConfig)
11
12if (JsonC_FIND_REQUIRED)
13 set(_pkgconfig_REQUIRED "REQUIRED")
14else()
15 set(_pkgconfig_REQUIRED "")
16endif()
17
18if(JsonC_FIND_VERSION)
19 pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c=${JsonC_FIND_VERSION})
20else()
21 pkg_check_modules(PC_JSONC ${_pkgconfig_REQUIRED} json-c)
22endif()
23
24find_path(JSONC_INCLUDE_DIRS NAMES json-c/json.h HINTS ${PC_JSONC_INCLUDE_DIRS})
25find_library(JSONC_LIBRARIES NAMES json-c HINTS ${PC_JSONC_LIBRARY_DIRS})
26include(FindPackageHandleStandardArgs)
27
28find_package_handle_standard_args(JSONC DEFAULT_MSG JSONC_LIBRARIES JSONC_INCLUDE_DIRS)
29mark_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 @@
1#.rst:
2# FindLibInput
3# -------
4#
5# Find LibInput library
6#
7# Try to find LibInpu library. The following values are defined
8#
9# ::
10#
11# LIBINPUT_FOUND - True if libinput is available
12# LIBINPUT_INCLUDE_DIRS - Include directories for libinput
13# LIBINPUT_LIBRARIES - List of libraries for libinput
14# LIBINPUT_DEFINITIONS - List of definitions for libinput
15#
16# and also the following more fine grained variables
17#
18# ::
19#
20# LIBINPUT_VERSION
21# LIBINPUT_VERSION_MAJOR
22# LIBINPUT_VERSION_MINOR
23# LIBINPUT_VERSION_MICRO
24#
25#=============================================================================
26# Copyright (c) 2015 Jari Vetoniemi
27#
28# Distributed under the OSI-approved BSD License (the "License");
29#
30# This software is distributed WITHOUT ANY WARRANTY; without even the
31# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32# See the License for more information.
33#=============================================================================
34
35include(FeatureSummary)
36set_package_properties(LibInput PROPERTIES
37 URL "http://freedesktop.org/wiki/Software/libinput/"
38 DESCRIPTION "Library to handle input devices")
39
40find_package(PkgConfig)
41pkg_check_modules(PC_INPUT QUIET libinput)
42find_library(LIBINPUT_LIBRARIES NAMES input HINTS ${PC_INPUT_LIBRARY_DIRS})
43find_path(LIBINPUT_INCLUDE_DIRS libinput.h HINTS ${PC_INPUT_INCLUDE_DIRS})
44
45set(LIBINPUT_VERSION ${PC_INPUT_VERSION})
46string(REPLACE "." ";" VERSION_LIST "${PC_INPUT_VERSION}")
47
48LIST(LENGTH VERSION_LIST n)
49if (n EQUAL 3)
50 list(GET VERSION_LIST 0 LIBINPUT_VERSION_MAJOR)
51 list(GET VERSION_LIST 1 LIBINPUT_VERSION_MINOR)
52 list(GET VERSION_LIST 2 LIBINPUT_VERSION_MICRO)
53endif ()
54
55# This is compatible with libinput-version.h that exists in upstream
56# but isn't in distribution (probably forgotten)
57set(LIBINPUT_DEFINITIONS ${PC_INPUT_CFLAGS_OTHER}
58 -DLIBINPUT_VERSION=\"${LIBINPUT_VERSION}\"
59 -DLIBINPUT_VERSION_MAJOR=${LIBINPUT_VERSION_MAJOR}
60 -DLIBINPUT_VERSION_MINOR=${LIBINPUT_VERSION_MINOR}
61 -DLIBINPUT_VERSION_MICRO=${LIBINPUT_VERSION_MICRO})
62
63include(FindPackageHandleStandardArgs)
64find_package_handle_standard_args(LIBINPUT DEFAULT_MSG LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES)
65mark_as_advanced(LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES LIBINPUT_DEFINITIONS
66 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 @@
1#.rst:
2# FindLibcap
3# -------
4#
5# Find Libcap library
6#
7# Try to find Libcap library. The following values are defined
8#
9# ::
10#
11# Libcap_FOUND - True if Libcap is available
12# Libcap_INCLUDE_DIRS - Include directories for Libcap
13# Libcap_LIBRARIES - List of libraries for Libcap
14# Libcap_DEFINITIONS - List of definitions for Libcap
15#
16# and also the following more fine grained variables
17#
18# ::
19#
20# Libcap_VERSION
21# Libcap_VERSION_MAJOR
22# Libcap_VERSION_MINOR
23#
24#=============================================================================
25# Copyright (c) 2017 Jerzi Kaminsky
26#
27# Distributed under the OSI-approved BSD License (the "License");
28#
29# This software is distributed WITHOUT ANY WARRANTY; without even the
30# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31# See the License for more information.
32#=============================================================================
33
34include(FeatureSummary)
35set_package_properties(Libcap PROPERTIES
36 URL "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2"
37 DESCRIPTION "Library for getting and setting POSIX.1e capabilities")
38
39find_package(PkgConfig)
40pkg_check_modules(PC_CAP QUIET Libcap)
41find_library(Libcap_LIBRARIES NAMES cap HINTS ${PC_CAP_LIBRARY_DIRS})
42find_path(Libcap_INCLUDE_DIRS sys/capability.h HINTS ${PC_CAP_INCLUDE_DIRS})
43
44set(Libcap_VERSION ${PC_CAP_VERSION})
45string(REPLACE "." ";" VERSION_LIST "${PC_CAP_VERSION}")
46
47LIST(LENGTH VERSION_LIST n)
48if (n EQUAL 2)
49 list(GET VERSION_LIST 0 Libcap_VERSION_MAJOR)
50 list(GET VERSION_LIST 1 Libcap_VERSION_MINOR)
51endif ()
52
53include(FindPackageHandleStandardArgs)
54find_package_handle_standard_args(Libcap DEFAULT_MSG Libcap_INCLUDE_DIRS Libcap_LIBRARIES)
55mark_as_advanced(Libcap_INCLUDE_DIRS Libcap_LIBRARIES Libcap_DEFINITIONS
56 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 @@
1# - Try to find the PAM libraries
2# Once done this will define
3#
4# PAM_FOUND - system has pam
5# PAM_INCLUDE_DIR - the pam include directory
6# PAM_LIBRARIES - libpam library
7
8if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
9 set(PAM_FIND_QUIETLY TRUE)
10endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)
11
12find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h pam/pam_appl.h)
13find_library(PAM_LIBRARY pam)
14find_library(DL_LIBRARY dl)
15
16if (PAM_INCLUDE_DIR AND PAM_LIBRARY)
17 set(PAM_FOUND TRUE)
18 if (DL_LIBRARY)
19 set(PAM_LIBRARIES ${PAM_LIBRARY} ${DL_LIBRARY})
20 else (DL_LIBRARY)
21 set(PAM_LIBRARIES ${PAM_LIBRARY})
22 endif (DL_LIBRARY)
23
24 if (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h)
25 set(HAVE_PAM_PAM_APPL_H 1)
26 endif (EXISTS ${PAM_INCLUDE_DIR}/pam/pam_appl.h)
27endif (PAM_INCLUDE_DIR AND PAM_LIBRARY)
28
29if (PAM_FOUND)
30 if (NOT PAM_FIND_QUIETLY)
31 message(STATUS "Found PAM: ${PAM_LIBRARIES}")
32 endif (NOT PAM_FIND_QUIETLY)
33else (PAM_FOUND)
34 if (PAM_FIND_REQUIRED)
35 message(FATAL_ERROR "PAM was not found")
36 endif(PAM_FIND_REQUIRED)
37endif (PAM_FOUND)
38
39mark_as_advanced(PAM_INCLUDE_DIR PAM_LIBRARY DL_LIBRARY)
40
41# This file taken from https://github.com/FreeRDP/FreeRDP
42#
43#
44#
45# Apache License
46# Version 2.0, January 2004
47# http://www.apache.org/licenses/
48#
49# TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
50#
51# 1. Definitions.
52#
53# "License" shall mean the terms and conditions for use, reproduction,
54# and distribution as defined by Sections 1 through 9 of this document.
55#
56# "Licensor" shall mean the copyright owner or entity authorized by
57# the copyright owner that is granting the License.
58#
59# "Legal Entity" shall mean the union of the acting entity and all
60# other entities that control, are controlled by, or are under common
61# control with that entity. For the purposes of this definition,
62# "control" means (i) the power, direct or indirect, to cause the
63# direction or management of such entity, whether by contract or
64# otherwise, or (ii) ownership of fifty percent (50%) or more of the
65# outstanding shares, or (iii) beneficial ownership of such entity.
66#
67# "You" (or "Your") shall mean an individual or Legal Entity
68# exercising permissions granted by this License.
69#
70# "Source" form shall mean the preferred form for making modifications,
71# including but not limited to software source code, documentation
72# source, and configuration files.
73#
74# "Object" form shall mean any form resulting from mechanical
75# transformation or translation of a Source form, including but
76# not limited to compiled object code, generated documentation,
77# and conversions to other media types.
78#
79# "Work" shall mean the work of authorship, whether in Source or
80# Object form, made available under the License, as indicated by a
81# copyright notice that is included in or attached to the work
82# (an example is provided in the Appendix below).
83#
84# "Derivative Works" shall mean any work, whether in Source or Object
85# form, that is based on (or derived from) the Work and for which the
86# editorial revisions, annotations, elaborations, or other modifications
87# represent, as a whole, an original work of authorship. For the purposes
88# of this License, Derivative Works shall not include works that remain
89# separable from, or merely link (or bind by name) to the interfaces of,
90# the Work and Derivative Works thereof.
91#
92# "Contribution" shall mean any work of authorship, including
93# the original version of the Work and any modifications or additions
94# to that Work or Derivative Works thereof, that is intentionally
95# submitted to Licensor for inclusion in the Work by the copyright owner
96# or by an individual or Legal Entity authorized to submit on behalf of
97# the copyright owner. For the purposes of this definition, "submitted"
98# means any form of electronic, verbal, or written communication sent
99# to the Licensor or its representatives, including but not limited to
100# communication on electronic mailing lists, source code control systems,
101# and issue tracking systems that are managed by, or on behalf of, the
102# Licensor for the purpose of discussing and improving the Work, but
103# excluding communication that is conspicuously marked or otherwise
104# designated in writing by the copyright owner as "Not a Contribution."
105#
106# "Contributor" shall mean Licensor and any individual or Legal Entity
107# on behalf of whom a Contribution has been received by Licensor and
108# subsequently incorporated within the Work.
109#
110# 2. Grant of Copyright License. Subject to the terms and conditions of
111# this License, each Contributor hereby grants to You a perpetual,
112# worldwide, non-exclusive, no-charge, royalty-free, irrevocable
113# copyright license to reproduce, prepare Derivative Works of,
114# publicly display, publicly perform, sublicense, and distribute the
115# Work and such Derivative Works in Source or Object form.
116#
117# 3. Grant of Patent License. Subject to the terms and conditions of
118# this License, each Contributor hereby grants to You a perpetual,
119# worldwide, non-exclusive, no-charge, royalty-free, irrevocable
120# (except as stated in this section) patent license to make, have made,
121# use, offer to sell, sell, import, and otherwise transfer the Work,
122# where such license applies only to those patent claims licensable
123# by such Contributor that are necessarily infringed by their
124# Contribution(s) alone or by combination of their Contribution(s)
125# with the Work to which such Contribution(s) was submitted. If You
126# institute patent litigation against any entity (including a
127# cross-claim or counterclaim in a lawsuit) alleging that the Work
128# or a Contribution incorporated within the Work constitutes direct
129# or contributory patent infringement, then any patent licenses
130# granted to You under this License for that Work shall terminate
131# as of the date such litigation is filed.
132#
133# 4. Redistribution. You may reproduce and distribute copies of the
134# Work or Derivative Works thereof in any medium, with or without
135# modifications, and in Source or Object form, provided that You
136# meet the following conditions:
137#
138# (a) You must give any other recipients of the Work or
139# Derivative Works a copy of this License; and
140#
141# (b) You must cause any modified files to carry prominent notices
142# stating that You changed the files; and
143#
144# (c) You must retain, in the Source form of any Derivative Works
145# that You distribute, all copyright, patent, trademark, and
146# attribution notices from the Source form of the Work,
147# excluding those notices that do not pertain to any part of
148# the Derivative Works; and
149#
150# (d) If the Work includes a "NOTICE" text file as part of its
151# distribution, then any Derivative Works that You distribute must
152# include a readable copy of the attribution notices contained
153# within such NOTICE file, excluding those notices that do not
154# pertain to any part of the Derivative Works, in at least one
155# of the following places: within a NOTICE text file distributed
156# as part of the Derivative Works; within the Source form or
157# documentation, if provided along with the Derivative Works; or,
158# within a display generated by the Derivative Works, if and
159# wherever such third-party notices normally appear. The contents
160# of the NOTICE file are for informational purposes only and
161# do not modify the License. You may add Your own attribution
162# notices within Derivative Works that You distribute, alongside
163# or as an addendum to the NOTICE text from the Work, provided
164# that such additional attribution notices cannot be construed
165# as modifying the License.
166#
167# You may add Your own copyright statement to Your modifications and
168# may provide additional or different license terms and conditions
169# for use, reproduction, or distribution of Your modifications, or
170# for any such Derivative Works as a whole, provided Your use,
171# reproduction, and distribution of the Work otherwise complies with
172# the conditions stated in this License.
173#
174# 5. Submission of Contributions. Unless You explicitly state otherwise,
175# any Contribution intentionally submitted for inclusion in the Work
176# by You to the Licensor shall be under the terms and conditions of
177# this License, without any additional terms or conditions.
178# Notwithstanding the above, nothing herein shall supersede or modify
179# the terms of any separate license agreement you may have executed
180# with Licensor regarding such Contributions.
181#
182# 6. Trademarks. This License does not grant permission to use the trade
183# names, trademarks, service marks, or product names of the Licensor,
184# except as required for reasonable and customary use in describing the
185# origin of the Work and reproducing the content of the NOTICE file.
186#
187# 7. Disclaimer of Warranty. Unless required by applicable law or
188# agreed to in writing, Licensor provides the Work (and each
189# Contributor provides its Contributions) on an "AS IS" BASIS,
190# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
191# implied, including, without limitation, any warranties or conditions
192# of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
193# PARTICULAR PURPOSE. You are solely responsible for determining the
194# appropriateness of using or redistributing the Work and assume any
195# risks associated with Your exercise of permissions under this License.
196#
197# 8. Limitation of Liability. In no event and under no legal theory,
198# whether in tort (including negligence), contract, or otherwise,
199# unless required by applicable law (such as deliberate and grossly
200# negligent acts) or agreed to in writing, shall any Contributor be
201# liable to You for damages, including any direct, indirect, special,
202# incidental, or consequential damages of any character arising as a
203# result of this License or out of the use or inability to use the
204# Work (including but not limited to damages for loss of goodwill,
205# work stoppage, computer failure or malfunction, or any and all
206# other commercial damages or losses), even if such Contributor
207# has been advised of the possibility of such damages.
208#
209# 9. Accepting Warranty or Additional Liability. While redistributing
210# the Work or Derivative Works thereof, You may choose to offer,
211# and charge a fee for, acceptance of support, warranty, indemnity,
212# or other liability obligations and/or rights consistent with this
213# License. However, in accepting such obligations, You may act only
214# on Your own behalf and on Your sole responsibility, not on behalf
215# of any other Contributor, and only if You agree to indemnify,
216# defend, and hold each Contributor harmless for any liability
217# incurred by, or claims asserted against, such Contributor by reason
218# of your accepting any such warranty or additional liability.
219#
220# END OF TERMS AND CONDITIONS
221#
222# APPENDIX: How to apply the Apache License to your work.
223#
224# To apply the Apache License to your work, attach the following
225# boilerplate notice, with the fields enclosed by brackets "[]"
226# replaced with your own identifying information. (Don't include
227# the brackets!) The text should be enclosed in the appropriate
228# comment syntax for the file format. We also recommend that a
229# file or class name and description of purpose be included on the
230# same "printed page" as the copyright notice for easier
231# identification within third-party archives.
232#
233# Copyright [yyyy] [name of copyright owner]
234#
235# Licensed under the Apache License, Version 2.0 (the "License");
236# you may not use this file except in compliance with the License.
237# You may obtain a copy of the License at
238#
239# http://www.apache.org/licenses/LICENSE-2.0
240#
241# Unless required by applicable law or agreed to in writing, software
242# distributed under the License is distributed on an "AS IS" BASIS,
243# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
244# See the License for the specific language governing permissions and
245# 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 @@
1# Copyright (C) 2007-2009 LuaDist.
2# Created by Peter Kapec <kapecp@gmail.com>
3# Redistribution and use of this file is allowed according to the terms of the MIT license.
4# For details see the COPYRIGHT file distributed with LuaDist.
5# Note:
6# Searching headers and libraries is very simple and is NOT as powerful as scripts
7# distributed with CMake, because LuaDist defines directories to search for.
8# Everyone is encouraged to contact the author with improvements. Maybe this file
9# becomes part of CMake distribution sometimes.
10
11# - Find pcre
12# Find the native PCRE headers and libraries.
13#
14# PCRE_INCLUDE_DIRS - where to find pcre.h, etc.
15# PCRE_LIBRARIES - List of libraries when using pcre.
16# PCRE_FOUND - True if pcre found.
17
18# Look for the header file.
19FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h)
20
21# Look for the library.
22FIND_LIBRARY(PCRE_LIBRARY NAMES pcre)
23
24# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
25INCLUDE(FindPackageHandleStandardArgs)
26FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
27
28# Copy the results to the output variables.
29IF(PCRE_FOUND)
30 SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
31 SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
32ELSE(PCRE_FOUND)
33 SET(PCRE_LIBRARIES)
34 SET(PCRE_INCLUDE_DIRS)
35ENDIF(PCRE_FOUND)
36
37MARK_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 @@
1# - Try to find the pango library
2# Once done this will define
3#
4# PANGO_FOUND - system has pango
5# PANGO_INCLUDE_DIRS - the pango include directory
6# PANGO_LIBRARIES - Link these to use pango
7#
8# Define PANGO_MIN_VERSION for which version desired.
9#
10
11find_package(PkgConfig)
12
13if(Pango_FIND_REQUIRED)
14 set(_pkgconfig_REQUIRED "REQUIRED")
15else(Pango_FIND_REQUIRED)
16 set(_pkgconfig_REQUIRED "")
17endif(Pango_FIND_REQUIRED)
18
19if(PANGO_MIN_VERSION)
20 pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} "pango>=${PANGO_MIN_VERSION}" "pangocairo>=${PANGO_MIN_VERSION}")
21else(PANGO_MIN_VERSION)
22 pkg_check_modules(PANGO ${_pkgconfig_REQUIRED} pango pangocairo)
23endif(PANGO_MIN_VERSION)
24
25if(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND)
26 find_path(PANGO_INCLUDE_DIRS pango.h)
27 find_library(PANGO_LIBRARIES pango pangocairo)
28else(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND)
29 # Make paths absolute https://stackoverflow.com/a/35476270
30 # Important on FreeBSD because /usr/local/lib is not on /usr/bin/ld's default path
31 set(PANGO_LIBS_ABSOLUTE)
32 foreach(lib ${PANGO_LIBRARIES})
33 set(var_name PANGO_${lib}_ABS)
34 find_library(${var_name} ${lib} ${PANGO_LIBRARY_DIRS})
35 list(APPEND PANGO_LIBS_ABSOLUTE ${${var_name}})
36 endforeach()
37 set(PANGO_LIBRARIES ${PANGO_LIBS_ABSOLUTE})
38endif(NOT PANGO_FOUND AND NOT PKG_CONFIG_FOUND)
39
40include(FindPackageHandleStandardArgs)
41find_package_handle_standard_args(PANGO DEFAULT_MSG PANGO_LIBRARIES PANGO_INCLUDE_DIRS)
42mark_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 @@
1# - Find wlc
2# Find the wlc libraries
3#
4# This module defines the following variables:
5# WLC_FOUND - True if wlc is found
6# WLC_LIBRARIES - wlc libraries
7# WLC_INCLUDE_DIRS - wlc include directories
8# WLC_DEFINITIONS - Compiler switches required for using wlc
9#
10
11find_package(PkgConfig)
12pkg_check_modules(PC_WLC QUIET wlc)
13find_path(WLC_INCLUDE_DIRS NAMES wlc/wlc.h HINTS ${PC_WLC_INCLUDE_DIRS})
14find_library(WLC_LIBRARIES NAMES wlc HINTS ${PC_WLC_LIBRARY_DIRS})
15
16set(WLC_DEFINITIONS ${PC_WLC_CFLAGS_OTHER})
17
18include(FindPackageHandleStandardArgs)
19find_package_handle_standard_args(wlc DEFAULT_MSG WLC_LIBRARIES WLC_INCLUDE_DIRS)
20mark_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 @@
1# Try to find Wayland on a Unix system
2#
3# This will define:
4#
5# WAYLAND_FOUND - True if Wayland is found
6# WAYLAND_LIBRARIES - Link these to use Wayland
7# WAYLAND_INCLUDE_DIR - Include directory for Wayland
8# WAYLAND_DEFINITIONS - Compiler flags for using Wayland
9#
10# In addition the following more fine grained variables will be defined:
11#
12# WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
13# WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
14# WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
15# WAYLAND_CURSOR_FOUND WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES
16#
17# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
18#
19# Redistribution and use is allowed according to the terms of the BSD license.
20# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
21
22IF (NOT WIN32)
23 IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES)
24 # In the cache already
25 SET(WAYLAND_FIND_QUIETLY TRUE)
26 ENDIF ()
27
28 # Use pkg-config to get the directories and then use these values
29 # in the FIND_PATH() and FIND_LIBRARY() calls
30 FIND_PACKAGE(PkgConfig)
31 PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
32
33 SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
34
35 FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
36 FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
37 FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
38 FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
39
40 FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
41 FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
42 FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
43 FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
44
45 set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR})
46
47 set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
48
49 list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR)
50
51 include(FindPackageHandleStandardArgs)
52
53 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR)
54 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR)
55 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR)
56 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR)
57 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR)
58
59 MARK_AS_ADVANCED(
60 WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES
61 WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
62 WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
63 WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
64 WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES
65 )
66
67ENDIF ()
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 @@
1# - Find wlroots
2# Find the wlroots libraries
3#
4# This module defines the following variables:
5# WLR_FOUND - True if wlroots is found
6# WLR_LIBRARIES - wlroots libraries
7# WLR_INCLUDE_DIRS - wlroots include directories
8# WLR_DEFINITIONS - Compiler switches required for using wlroots
9#
10
11find_package(PkgConfig)
12pkg_check_modules(PC_WLR QUIET wlroots)
13find_path(WLR_INCLUDE_DIRS NAMES wlr/config.h HINTS ${PC_WLR_INCLUDE_DIRS})
14find_library(WLR_LIBRARIES NAMES wlroots HINTS ${PC_WLR_LIBRARY_DIRS})
15
16set(WLR_DEFINITIONS ${PC_WLR_CFLAGS_OTHER})
17
18include(FindPackageHandleStandardArgs)
19find_package_handle_standard_args(wlr DEFAULT_MSG WLR_LIBRARIES WLR_INCLUDE_DIRS)
20mark_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 @@
1# - Find XKBCommon
2# Once done, this will define
3#
4# XKBCOMMON_FOUND - System has XKBCommon
5# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
6# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
7# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
8
9find_package(PkgConfig)
10pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
11find_path(XKBCOMMON_INCLUDE_DIRS NAMES xkbcommon/xkbcommon.h HINTS ${PC_XKBCOMMON_INCLUDE_DIRS})
12find_library(XKBCOMMON_LIBRARIES NAMES xkbcommon HINTS ${PC_XKBCOMMON_LIBRARY_DIRS})
13
14set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
15
16include(FindPackageHandleStandardArgs)
17find_package_handle_standard_args(XKBCOMMON DEFAULT_MSG XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS)
18mark_as_advanced(XKBCOMMON_LIBRARIES XKBCOMMON_INCLUDE_DIRS)
19
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 @@
1find_package(A2X)
2
3if (A2X_FOUND)
4 add_custom_target(man ALL)
5
6 function(add_manpage name section)
7 add_custom_command(
8 OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
9 COMMAND ${A2X_COMMAND}
10 --no-xmllint
11 --doctype manpage
12 --format manpage
13 -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
14 ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
15 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.${section}.txt
16 COMMENT Generating manpage for ${name}.${section}
17 )
18
19 add_custom_target(man-${name}.${section}
20 DEPENDS
21 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
22 )
23 add_dependencies(man
24 man-${name}.${section}
25 )
26
27 install(
28 FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
29 DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man${section}
30 COMPONENT documentation
31 )
32 endfunction()
33endif()
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 @@
1#=============================================================================
2# Copyright (C) 2012-2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# * Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11#
12# * Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15#
16# * Neither the name of Pier Luigi Fiorini nor the names of his
17# contributors may be used to endorse or promote products derived
18# from this software without specific prior written permission.
19#
20# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31#=============================================================================
32
33find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
34
35# wayland_add_protocol_client(outfiles inputfile basename)
36function(WAYLAND_ADD_PROTOCOL_CLIENT _sources _protocol _basename)
37 if(NOT WAYLAND_SCANNER_EXECUTABLE)
38 message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.")
39 endif()
40
41 get_filename_component(_infile ${_protocol} ABSOLUTE)
42 set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.h")
43 set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-client-protocol.c")
44
45 add_custom_command(OUTPUT "${_client_header}"
46 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${_infile} > ${_client_header}
47 DEPENDS ${_infile} VERBATIM)
48
49 add_custom_command(OUTPUT "${_code}"
50 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code}
51 DEPENDS ${_infile} VERBATIM)
52
53 list(APPEND ${_sources} "${_client_header}" "${_code}")
54 set(${_sources} ${${_sources}} PARENT_SCOPE)
55endfunction()
56
57# wayland_add_protocol_server(outfiles inputfile basename)
58function(WAYLAND_ADD_PROTOCOL_SERVER _sources _protocol _basename)
59 if(NOT WAYLAND_SCANNER_EXECUTABLE)
60 message(FATAL "The wayland-scanner executable has not been found on your system. You must install it.")
61 endif()
62
63 get_filename_component(_infile ${_protocol} ABSOLUTE)
64 set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.h")
65 set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${_basename}-server-protocol.c")
66
67 add_custom_command(OUTPUT "${_server_header}"
68 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} server-header < ${_infile} > ${_server_header}
69 DEPENDS ${_infile} VERBATIM)
70
71 add_custom_command(OUTPUT "${_code}"
72 COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code < ${_infile} > ${_code}
73 DEPENDS ${_infile} VERBATIM)
74
75 list(APPEND ${_sources} "${_server_header}" "${_code}")
76 set(${_sources} ${${_sources}} PARENT_SCOPE)
77endfunction()
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.
53 53
54Install dependencies: 54Install dependencies:
55 55
56* cmake 56* meson
57* [wlroots](https://github.com/swaywm/wlroots) 57* [wlroots](https://github.com/swaywm/wlroots)
58* wayland 58* wayland
59* xwayland 59* xwayland
@@ -78,11 +78,9 @@ _\*\*\*Only required for tray support_
78 78
79Run these commands: 79Run these commands:
80 80
81 mkdir build 81 meson build
82 cd build 82 ninja -C build
83 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_SYSCONFDIR=/etc .. 83 sudo ninja -C build install
84 make
85 sudo make install
86 84
87On systems with logind, you need to set a few caps on the binary: 85On systems with logind, you need to set a few caps on the binary:
88 86
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 @@
1include(Wayland)
2
3WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-xdg-shell
4 xdg-shell.xml
5 xdg-shell
6)
7WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-desktop-shell
8 desktop-shell.xml
9 desktop-shell
10)
11WAYLAND_ADD_PROTOCOL_SERVER(proto-server-desktop-shell
12 desktop-shell.xml
13 desktop-shell
14)
15
16WAYLAND_ADD_PROTOCOL_CLIENT(proto-client-swaylock
17 swaylock.xml
18 swaylock
19)
20WAYLAND_ADD_PROTOCOL_SERVER(proto-server-swaylock
21 swaylock.xml
22 swaylock
23)
24
25WAYLAND_ADD_PROTOCOL_SERVER(proto-server-gamma-control
26 gamma-control.xml
27 gamma-control
28)
29
30WAYLAND_ADD_PROTOCOL_SERVER(proto-server-server-decoration
31 server-decoration.xml
32 server-decoration
33)
34
35add_library(sway-protocols STATIC
36 ${proto-client-xdg-shell}
37 ${proto-client-desktop-shell}
38 ${proto-server-desktop-shell}
39 ${proto-client-swaylock}
40 ${proto-server-swaylock}
41 ${proto-server-gamma-control}
42 ${proto-server-server-decoration}
43 )
44
45set(PROTOCOLS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/protocols PARENT_SCOPE)
46INCLUDE_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 @@
1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
3 ${WAYLAND_INCLUDE_DIR}
4 ${CAIRO_INCLUDE_DIRS}
5 ${PANGO_INCLUDE_DIRS}
6 ${JSONC_INCLUDE_DIRS}
7 ${XKBCOMMON_INCLUDE_DIRS}
8 ${DBUS_INCLUDE_DIRS}
9)
10if (ENABLE_TRAY)
11 file(GLOB tray
12 tray/*.c
13 )
14endif()
15
16add_executable(swaybar
17 main.c
18 config.c
19 render.c
20 bar.c
21 status_line.c
22 ipc.c
23 event_loop.c
24 ${tray}
25)
26
27target_link_libraries(swaybar
28 sway-common
29 sway-wayland
30 ${WAYLAND_CLIENT_LIBRARIES}
31 ${WAYLAND_CURSOR_LIBRARIES}
32 ${CAIRO_LIBRARIES}
33 ${PANGO_LIBRARIES}
34 ${JSONC_LIBRARIES}
35 ${DBUS_LIBRARIES}
36)
37
38if (WITH_GDK_PIXBUF)
39 include_directories(
40 ${GDK_PIXBUF_INCLUDE_DIRS}
41 )
42endif()
43
44target_link_libraries(swaybar rt)
45
46install(
47 TARGETS swaybar
48 RUNTIME
49 DESTINATION bin
50 COMPONENT runtime
51)
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 @@
1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
3 ${WAYLAND_INCLUDE_DIR}
4 ${CAIRO_INCLUDE_DIRS}
5 ${PANGO_INCLUDE_DIRS}
6 ${XKBCOMMON_INCLUDE_DIRS}
7)
8
9add_executable(swaybg
10 main.c
11)
12
13target_link_libraries(swaybg
14 sway-common
15 sway-wayland
16 ${WAYLAND_CLIENT_LIBRARIES}
17 ${WAYLAND_CURSOR_LIBRARIES}
18 ${CAIRO_LIBRARIES}
19 ${PANGO_LIBRARIES}
20 m
21)
22
23if (WITH_GDK_PIXBUF)
24 include_directories(
25 ${GDK_PIXBUF_INCLUDE_DIRS}
26 )
27 target_link_libraries(swaybg
28 ${GDK_PIXBUF_LIBRARIES}
29 )
30endif()
31
32install(
33 TARGETS swaybg
34 RUNTIME
35 DESTINATION bin
36 COMPONENT runtime
37)
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 @@
1include_directories(
2 ${JSONC_INCLUDE_DIRS}
3 ${WLC_INCLUDE_DIRS}
4 ${XKBCOMMON_INCLUDE_DIRS}
5)
6
7add_executable(swaygrab
8 main.c
9 json.c
10)
11
12target_link_libraries(swaygrab
13 sway-common
14 ${JSONC_LIBRARIES}
15 rt
16 m
17)
18
19install(
20 TARGETS swaygrab
21 RUNTIME
22 DESTINATION bin
23 COMPONENT runtime
24)
25
26if (A2X_FOUND)
27 add_manpage(swaygrab 1)
28endif()
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 @@
1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
3 ${WAYLAND_INCLUDE_DIR}
4 ${CAIRO_INCLUDE_DIRS}
5 ${PANGO_INCLUDE_DIRS}
6 ${PAM_INCLUDE_DIRS}
7 ${JSONC_INCLUDE_DIRS}
8 ${XKBCOMMON_INCLUDE_DIRS}
9)
10
11add_executable(swaylock
12 main.c
13)
14
15target_link_libraries(swaylock
16 sway-common
17 sway-wayland
18 ${WAYLAND_CLIENT_LIBRARIES}
19 ${WAYLAND_CURSOR_LIBRARIES}
20 ${CAIRO_LIBRARIES}
21 ${PANGO_LIBRARIES}
22 ${PAM_LIBRARIES}
23 ${JSONC_LIBRARIES}
24 m
25)
26
27if (WITH_GDK_PIXBUF)
28 include_directories(
29 ${GDK_PIXBUF_INCLUDE_DIRS}
30 )
31 target_link_libraries(swaylock
32 ${GDK_PIXBUF_LIBRARIES}
33 )
34endif()
35
36install(
37 TARGETS swaylock
38 RUNTIME
39 DESTINATION bin
40 COMPONENT runtime
41)
42
43install(
44 FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock
45 DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/
46 COMPONENT data
47)
48
49if (A2X_FOUND)
50 add_manpage(swaylock 1)
51endif()
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 @@
1include_directories(
2 ${PROTOCOLS_INCLUDE_DIRS}
3 ${PANGO_INCLUDE_DIRS}
4 ${XKBCOMMON_INCLUDE_DIRS}
5 ${WAYLAND_INCLUDE_DIR}
6 ${EPOLLSHIM_INCLUDE_DIRS}
7)
8
9add_library(sway-wayland STATIC
10 buffers.c
11 pango.c
12 registry.c
13 window.c
14 cairo.c
15 )
16
17target_link_libraries(sway-wayland
18 sway-common
19 sway-protocols
20 ${PANGO_LIBRARIES}
21 ${XKBCOMMON_LIBRARIES}
22 ${EPOLLSHIM_LIBRARIES}
23 )
24
25if (WITH_GDK_PIXBUF)
26 include_directories(
27 ${GDK_PIXBUF_INCLUDE_DIRS}
28 )
29 target_link_libraries(sway-wayland
30 ${GDK_PIXBUF_LIBRARIES}
31 )
32endif()